1
0

c7-13.c 341 B

12345678910111213141516171819
  1. #include <stdio.h>
  2. int main()
  3. { int max_value(int array[][4]);
  4. int a[3][4]={{1,3,5,7},{2,4,6,8},{15,17,34,12}};
  5. printf("Max value is %d\n",max_value(a));
  6. return 0;
  7. }
  8. int max_value(int array[][4])
  9. { int i,j,max;
  10. max=array[0][0];
  11. for(i=0;i<3;i++)
  12. for(j=0;j<4;j++)
  13. if(array[i][j]>max)max=array[i][j];
  14. return (max);
  15. }