看下这个程序如何写,给个思路

看下这个程序怎么写,给个思路
看下这个程序怎么写,给个思路   最后把代码写出来,谢谢了  
刚学C,觉得不是要记录的变量太多,我实验起来有点难`请大家帮帮忙

题目如下:
输入一个班10个学生的学号和每个学生考试三门功课(数学,英语、计算机基础)的成绩。编程计算出每个学生的总分和平均分,并按学生成绩的优劣排序,最后打印一张按高分到低分名次排序的成绩单。
要求:
1,排序用一个函数实验
2,打印成绩单表项包括:序号,学号,数学,英语,计算机,总分,平均分



------解决方案--------------------
定义一个结构体变量
struct student
{
long num;
char name;
int score[3];
}stu[10];
这样就十分容易处理了.
------解决方案--------------------
先把输入的数据保存到文件里面,用楼上是所说的结构struct student
{
long num;
char name;
int score[3];
int totalScore;
int AvgScore;
}stu[10];
------解决方案--------------------
#include <stdio.h>
struct student
{
long no;
float score[3];
float totalscore;
float avescore;
}stu[10];
void sort(struct student a[],int n);
void print(struct student a[],int n);
void main()
{
int i;
printf( "请输入10个学生的信息(学号,3门成绩): ");
for(i=0;i <10;i++)
{
printf( "请输入第%d个学生的学号,3门成绩(数学,英语,计算机): ",i+1);
scanf( "%ld,%f,%f,%f ",&stu[i].no,&stu[i].score[1],&stu[i].score[2],&stu[i].score[3]);
stu[i].totalscore=stu[i].score[1]+stu[i].score[2]+stu[i].score[3];
stu[i].avescore=stu[i].totalscore/3;
}
sort(stu,10);
printf( "名次,学号,数学,英语,计算机,总分,平均分\n ");
for(i=0;i <10;i++)
{
printf( "%d,%ld,%f,%f,%f,%f,%f\n ",i+1,stu[i].no,stu[i].score[1],stu[i].score[2],stu[i].score[3],stu[i].totalscore,stu[i].avescore);
}
}
void sort(struct student a[],int n)
{
int i,j,p;
struct student temp;
for(i=0;i <n-1;i++)
{
p=i;
for(j=i+1;j <10;j++)
if(a[j].avescore> a[p].avescore)
p=j;
if(p!=i)
{
temp=a[i];
a[i]=a[p];
a[p]=temp;
}
}
}

------解决方案--------------------
不好意思,那个void print(struct student a[],int n);未用上,不过没关系.你看着修改一下就行了
------解决方案--------------------
编译器与语言无关,显示中文只与操作系统有关。