int main()
{
int average3(int x,int y,int z);
int average5(int x,int y,int z,int a,int b);
int geren_scores,kecheng_scores;
int i,j,a[5][3];
printf("please input datas:");
for(i=0;i<5;i++)
{
for(j=0;j<3;j++)
scanf("%d",&a[i][j]);
}
for(i=0;i<5;i++)
{
geren_scores=average3(a[i][0],a[i][1],a[i][2]);
printf("Personnal score is:%d",geren_scores);
printf("\n"); }
for(j=0;j<3;j++)
{
kecheng_scores=average5(a[0][j],a[1][j],a[2][j],a[3][j],a[4][j]);
printf("average is:%d",kecheng_scores);
printf("\n"); }
return 0;
}
int average3(int x,int y,int z)
{
int k;
k=(x+y+z)/3;
return k;
}
int average5(int x,int y,int z,int a,int b)
{
int k;
k=(x+y+z+a+b)/5;
return k;
}