#include<stdio.h>
#define PLAYER 4
#define MATCH 3
int main(void)
{
//将4名球员近三场比赛的得分初始化
int arrmark[MATCH][PLAYER]={
{9,8,7,5},
{8,10,8,7},
{7,7,10,6}
};
//输出具体成绩
int i,j;
printf("***********Roony Ronaldo Kaka Grosso\n");
for(i=0;i<MATCH;i++)
{
printf("match%d:",i);
for(j=0;j<PLAYER;j++)
{
printf("%8d",arrmark[i][j]);
}
printf("\n");
}
//打印总分
int temp=0;
printf("total ");
for(i=0;i<PLAYER;i++) //求每个球员的总分
{
for(j=0;j<MATCH;j++)
{
temp+=arrmark[j][i];
}
printf("%d ",temp);
temp=0;
}
getchar();
}