C语言题目·求解释
问题描述:
C语言题目·求解释
答
#include<stdio.h>
int main()
{
int a[4][4] = {{1,2,3,4}, {5,6,7,8}, {9,10,11,12}, {13,14,15,16}};
int max = 0;
for(int i = 0; i < 4*4; i++)
{
if(i == 0)
{
max = a[0][i];
}
else
{
if(a[0][i] > max)
{
max = a[0][i];
}
}
}
printf("%d\n",max);
return 0;
}