求二维数组a中的最大值和最小值#include #include void main(){ int a[3][3]={4,4,34,37,3,12,5,6,5},i,j,max,min;max = min = a[0][0];for ( i=0; i
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/25 01:40:04
求二维数组a中的最大值和最小值#include#includevoidmain(){inta[3][3]={4,4,34,37,3,12,5,6,5},i,j,max,min;max=min=a[0]
求二维数组a中的最大值和最小值#include #include void main(){ int a[3][3]={4,4,34,37,3,12,5,6,5},i,j,max,min;max = min = a[0][0];for ( i=0; i
求二维数组a中的最大值和最小值
#include
#include
void main()
{ int a[3][3]={4,4,34,37,3,12,5,6,5},i,j,max,min;
max = min = a[0][0];
for ( i=0; i
求二维数组a中的最大值和最小值#include #include void main(){ int a[3][3]={4,4,34,37,3,12,5,6,5},i,j,max,min;max = min = a[0][0];for ( i=0; i
#include
#include
void main()
{ int a[3][3]={4,4,34,37,3,12,5,6,5},i,j,max,min;
max = min = a[0][0];
for ( i=0; i a[i][j]) //此处min < a[i][j]应为min > a[i][j]
min = a[i][j];
}
printf("The max is: %d\n", max);
printf("The min is: %d\n", min);
}