#include <stdio.h>
#include<stdlib.h>
#include<math.h>
#include<time.h>
#define NULL 0
#define N 6
int main()
{
int a[N][N],i,j,s=0,c=0;
srand(time(NULL));
for(i=0;i<N;i++)
{ for(j=0;j<N;j++)
printf("%5d",a[i][j]=rand()%26+65);
printf("\n");
}
for(i=0;i<N;i++)
{
s+=a[i][i];
if(a[i][N-1-i]%2==0)
c++;
}
printf("s=%d,c=%d\n",s,c);
system("pause");
}
11-14
1847

01-29
614
