高手们帮帮忙吧 为什么老错啊
#include <stdio.h>
void average(int score[]);
void average(int score[]);
int main()
{
int j,i;
float score[3][4]={{87.00,8.5,4.00},{56.00,34.56,56.56}};
char name[5][7]={"李寻欢","韦小宝"};
char sub[5][6]={"姓名","语文","数学","英语","总评"};
for(i=0;i<5;i++)
{
printf("%s\t\t",sub[i]);
}
putchar('\n');
for(i=0;i<3;i++)
{
printf("%s\t",name[i]);
average(score[i]);
output(score[i]);
putchar('\n');
}
return 0;
}
void output(int score[])
{
for(int i=0;i<4;i++)
{
printf("%d\t\t",score[i]);
}
}
void average(int score[])
{
int all=0;
for(int i=0;i<5;i++)
{
all=all+score[i];
score[3]=all/3;
}
}