Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include "my.h"
  2.  
  3. void small(int rownum, int colnum, int** table)
  4.  
  5. {
  6. int j;
  7. int i;
  8. int small;
  9. int z;
  10.  
  11. printf("f.The various first indices of the smallest int for each and every row is:\n");
  12.  
  13. small = INT_MAX;
  14. //large = INT_MIN;
  15.  
  16.  
  17. //small
  18.  
  19. {
  20. for( i=0; i<rownum; i++)
  21. {
  22. for( j=0; j<colnum; j++)
  23.  
  24. if (table[i][j] < small )
  25. {
  26. small = table[i][j];
  27. z=j;
  28. }
  29.  
  30. printf("%4d" , z);
  31. small = INT_MAX;
  32. }
  33.  
  34.  
  35. }
  36. return;
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement