#include "stdafx.h"
#include "stdio.h"
int average1(int x,int y,int z)
{
int t;
t=(x+y+z)/3;
return t;
}
int average2(int x,int y,int z,int a,int b)
{
int t;
t=(x+y+z+a+b)/5;
return t;
}
int main(int argc, char* argv[])
{
int a[5][3];
int i,j;
int c,b;
for (i=0;i<5;i++)
{
for (j=0;j<3;j++)
{
scanf("%d",&a[i][j]);
}
}
printf("学生平均分:\n");
for (i=0;i<5;i++)
{
c=average1(a[i][0],a[i][1],a[i][2]);
printf("%d\n",c);
}
printf("课程平均分:\n");
for(j=0;j<3;j++)
{
b=average2(a[0][j],a[1][j],a[2][j],a[3][j],a[4][j]);
printf("%d\n",b);
}
return 0;
}