以下程序中,主函数调用了LineMax函数,实现在N行M列的二维数组中,找出每一行上的最大值。 请填空。 #define N 3 #define M 4 void LineMax(int x[N][M])

admin2009-02-15  56

问题 以下程序中,主函数调用了LineMax函数,实现在N行M列的二维数组中,找出每一行上的最大值。
请填空。
   #define    N    3
   #define    M    4
   void  LineMax(int  x[N][M])
   {  int  i,j,P;
      for(i=0;i<N;i++)
      {  p=0;
           for(j=1;j<M;j++)
             if(x[p]<x[j])【  】;
           printf("The max value in line %d is %d\n",i,【  】);
   }
   main()
   {  int  x[N][M]={1,5,7,4,2,6,4,3,8,2,3,1};
【  】;
   }

选项

答案p=j x[i][p] LineMax(x)

解析
转载请注明原文地址:https://kaotiyun.com/show/kNXp777K
0

最新回复(0)