#include<stdio.h>
int main()
{
int n,i,j,a[100][100],sum=0;
scanf("%d",&n);
for(i=0;i<n;i++)
for(j=0;j<n;j++)
scanf("%d",&a[i][j]);
for(i=0;i<n;i++)
for(j=0;j<n;j++)
{if(i==j||i+j==n-1)
sum+=a[i][j];
}
printf("%d",sum);
return 0;
}
标签:return,int,sum,11.20,100,main,scanf From: https://blog.51cto.com/u_15758636/5872045