85 61 59 85 76
75 65 63 87 77
92 71 70 90 85
就按上面这个形式输就可以了
#include<stdio.h>
main()
{
int i,j,s=0,average,v[3],a[5][3];
printf("input score\n");
for(i=0;i<3;i++)
{
for(j=0;j<5;j++)
{ scanf("%d",&a[j][i]);
s=s+a[j][i];}
v[i]=s/5;
s=0;
}
average =(v[0]+v[1]+v[2])/3;
printf("math:%d\nc languag:%d\ndbase:%d\n",v[0],v[1],v[2]);
printf("total:%d\n", average );
getch();
}
75 65 63 87 77
92 71 70 90 85
就按上面这个形式输就可以了
#include<stdio.h>
main()
{
int i,j,s=0,average,v[3],a[5][3];
printf("input score\n");
for(i=0;i<3;i++)
{
for(j=0;j<5;j++)
{ scanf("%d",&a[j][i]);
s=s+a[j][i];}
v[i]=s/5;
s=0;
}
average =(v[0]+v[1]+v[2])/3;
printf("math:%d\nc languag:%d\ndbase:%d\n",v[0],v[1],v[2]);
printf("total:%d\n", average );
getch();
}