list_test 463 B

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