学生期末成绩的管理问题
#include<stdio.h>int main ()
{
float aver=0,s1=0;
int n=1,i,j,k,sum = 0;
int a[114][6]={
22, 15, 10, 20, 3, 6,
24, 11, 10, 16, 0, 8,
26, 11, 10, 12, 0, 5,
26, 11, 10, 15, 5, 8,
15, 15, 10, 20, 8, 4,
24, 12, 9, 12, 6, 8,
21, 15, 5, 16, 6, 6,
22, 15, 10, 16, 6, 10,
26, 15, 10, 12, 2, 10,
26, 11, 10, 16, 0, 8,
26, 3, 10, 12, 5, 8,
29, 15, 10, 20, 8, 6,
28, 11, 10, 10, 10, 8,
21, 15, 10, 16, 6, 8,
26, 15, 10, 16, 1, 6,
24, 7, 10, 0, 0, 0,
22, 3, 10, 16, 5, 10,
29, 11, 10, 20, 7, 10,
28, 11, 10, 20, 10, 10,
24, 12, 10, 20, 6, 10,
22, 11, 10, 16, 8, 10,
24, 7, 5, 16, 2, 2,
22, 15, 10, 12, 10, 8,
26, 11, 10, 12, 5, 8,
28, 15, 8, 20, 8, 8,
26, 15, 9, 16, 6, 8,
15, 15, 10, 8, 2, 6,
26, 15, 7, 8, 3, 10,
31, 15, 10, 16, 8, 10,
22, 15, 10, 16, 10, 8,
21, 15, 10, 20, 8, 8,
26, 15, 10, 20, 5, 8,
26, 11, 10, 10, 10, 10,
21, 15, 10, 16, 4, 10,
26, 11, 10, 10, 6, 10,
24, 9, 10, 16, 10, 8,
26, 15, 7, 16, 0, 8,
31, 15, 10, 20, 4, 10,
19, 15, 9, 20, 8, 10,
28, 3, 10, 20, 8, 8,
19, 12, 10, 12, 7, 6,
21, 15, 10, 16, 0, 8,
24, 7, 10, 12, 0, 10,
24, 11, 10, 4, 6, 8,
24, 15, 10, 16, 10, 8,
26, 15, 10, 15, 8, 8,
17, 15, 10, 16, 5, 10,
19, 15, 10, 16, 0, 8,
24, 11, 10, 16, 4, 10,
29, 15, 10, 20, 10, 10,
26, 15, 10, 20, 4, 10,
19, 15, 10, 0, 3, 8,
29, 15, 10, 20, 10, 10,
24, 15, 10, 16, 6, 8,
24, 15, 10, 12, 10, 10,
17, 0, 10, 12, 1, 0,
29, 15, 10, 8, 10, 10,
19, 15, 10, 12, 10, 8,
19, 7, 9, 16, 8, 10,
29, 12, 10, 8, 10, 10,
24, 11, 9, 16, 10, 10,
22, 11, 9, 16, 6, 10,
22, 15, 10, 20, 8, 8,
26, 7, 10, 20, 8, 10,
22, 15, 10, 20, 0, 0,
19, 15, 9, 16, 8, 10,
26, 15, 10, 20, 8, 8,
24, 3, 10, 20, 8, 8,
26, 15, 10, 20, 3, 10,
24, 7, 10, 16, 4, 8,
24, 15, 10, 20, 10, 10,
24, 15, 10, 8, 8, 10,
19, 7, 10, 4, 0, 0,
28, 15, 10, 20, 10, 6,
24, 11, 7, 20, 0, 0,
35, 11, 10, 16, 2, 6,
24, 11, 10, 12, 1, 10,
22, 15, 10, 20, 8, 10,
22, 15, 10, 20, 10, 10,
21, 12, 9, 20, 10, 10,
22, 15, 10, 16, 6, 10,
22, 7, 10, 12, 10, 10,
17, 12, 9, 16, 8, 10,
21, 11, 9, 8, 2, 8,
24, 15, 9, 16, 10, 10,
19, 15, 10, 20, 8, 8,
15, 11, 9, 8, 6, 4,
29, 15, 10, 16, 6, 10,
17, 15, 10, 15, 4, 8,
29, 7, 9, 8, 0, 4,
26, 7, 10, 12, 6, 8,
21, 15, 9, 20, 4, 10,
19, 11, 10, 0, 0, 8,
24, 15, 9, 16, 8, 10,
22, 15, 10, 20, 1, 8,
21, 11, 10, 12, 6, 10,
29, 15, 10, 20, 8, 10,
26, 15, 3, 12, 8, 8,
26, 15, 7, 16, 3, 10,
26, 11, 10, 20, 8, 10,
22, 11, 10, 20, 2, 8,
22, 11, 10, 20, 2, 8,
26, 15, 10, 16, 8, 10,
29, 11, 10, 12, 2, 8,
19, 15, 7, 16, 8, 8,
24, 11, 10, 10, 6, 6,
24, 7, 10, 16, 0, 10,
29, 15, 10, 16, 10, 4,
29, 9, 6, 16, 2, 10,
22, 15, 10, 12, 8, 10,
19, 11, 10, 20, 4, 8,
26, 15, 9, 8, 6, 8,
22, 11, 9, 16, 8, 10,
21, 15, 10, 16, 8, 10};
for(j=0;j<114;j++)
{
for(i=0;i<5;i++)
{
sum += a[i][j];
}
printf("学生序号: %d, sum = %d\n",n, sum);
sum=0;
n++;
}
for(i=0;i<5;i++)
{
for(j=0;j<114;j++)
{
s1+=a[i][j];
aver=s1/114;
}
printf("小题平均分: %7.2f\n",aver);
}
return 0;
}
1 求出所有同学的总分
2 求各小题全班平均得分,据此判断全班掌握程度
3 按每人得分从高到低排序
编写C语言程序,调试通过。
这个程序总是不会 哪个大神帮忙 改写调试一下,完成者三个步骤