fork download
  1. #include <stdio.h>
  2. #define STUDENTS 3
  3. #define EXAM 4
  4. int minimum( const int (*grades)[EXAM] );
  5. int main(void) {
  6. printf("min\n");
  7. int grades[STUDENTS][EXAM]={{77,68,86,73},{96,87,89,78},{70,90,86,81}};
  8. printf("%d",minimum(grades));
  9. return 0;
  10. }
  11. int minimum( const int (*grades)[EXAM] ){
  12. int min=100;
  13. for(int i=0;i<STUDENTS;i++){
  14. for(int j=0;j<EXAM;j++){
  15. if(grades[i][j]<min){
  16. min=grades[i][j];
  17. }
  18. }
  19. }
  20. return min;
  21. }
  22.  
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
min
68