7-7

#include<stdio.h>

int main(void)

{

         int col,i,j,row;

         int a[3][2];

 

         printf("Enter 6 integers:\n");

         for(i=0;i<3;i++)

                   for(j=0;j<2;j++)

                            scanf("%d",&a[i][j]);

                   for(i=0;i<3;i++){

                            for(j=0;j<2;j++)

                                     printf("%4d",a[i][j]);

                            printf("\n");

                   }

                   row=col=0;

                   for(i=0;i<3;i++)

                            for(j=0;j<2;j++)

                                     if(a[i][j]>a[row][col]){

                                               row=i;

                                               col=j;

                                     }

                                     printf("max=a[%d][%d]=%d\n",row,col,a[row][col]);

 

                                     return 0;

}

posted @ 2013-10-06 15:34  zhaoyang16  阅读(132)  评论(0编辑  收藏  举报