Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language! How to find the value of the largest element in a 3×3 plastic matrix, and return the maximum value to the main function for output, and the matrix is also output! thank you
C language! How to find the value of the largest element in a 3×3 plastic matrix, and return the maximum value to the main function for output, and the matrix is also output! thank you
int get_max(int a[4][4])

{

int i,j;

int max =-0x fffffff;

for(I = 1; I < = 3; i++)

for(j = 1; j & lt=3; j++)

max = max & gta[i][j]? max:a[I][j];

Return to max

}

Just pass the array directly into the main function. It is recommended not to go to Baidu to find the answer to your homework.