fork download
  1. // no loop here
  2.  
  3. void SelectionSort(FILE * spData, float score[][SCORE], int last)
  4. {
  5. // Local Declarations
  6. float temp;
  7. int i;
  8. int j;
  9. int smallest;
  10. int walk;
  11.  
  12. // outer loop
  13. for (i = 0; i < MAX; i++) {
  14. printf("Processing row %d\n", i);
  15.  
  16. // middle loop
  17. for (j = 0; j < last; j++) {
  18. smallest = j;
  19.  
  20. // inner loop
  21. for (walk = j + 1; walk <= last; walk++) {
  22. printf(" - Comparing column %d\n", walk);
  23. if (score[i][walk] < score[i][smallest]) {
  24. smallest = walk;
  25. }
  26. // smallest selected
  27. temp = score[i][j];
  28. score[i][j] = score[i][smallest];
  29. score[i][smallest] = temp;
  30. }
  31. }
  32.  
  33. }
  34. return;
  35. }
  36.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:3: error: expected ‘)’ before ‘*’ token
stdout
Standard output is empty