list_test 507 B

1234567891011121314151617181920212223
  1. #include "list"
  2. void main() {
  3. IntList* intList = listNewInt();
  4. FloatList* floatList = listNewFloat();
  5. for(int i = 0; i < 5; i++) {
  6. listAdd(intList, i * 50 + 3);
  7. listAdd(floatList, (float)i * 3.0);
  8. }
  9. for(int i = 0; i < listGetLength(intList); i++) {
  10. test(listGetIndex(intList, i));
  11. }
  12. for(int i = 0; i < listGetLength(floatList); i++) {
  13. test(listGetIndex(floatList, i));
  14. }
  15. listDelete(intList);
  16. listDelete(floatList);
  17. }