学生成绩管理系统v3.0

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

//成绩管理系统v3.0

// 能动1302 王清栋1306030217

#include

#include

#include

#define N 30

void Input (long num[],int score[],int n,char name[][10]);

void Totalave (int score[],int n);

void Scoredes (long num[],int score[],int n,char name[][10]);

void Scoreas (long num[],int score[],int n,char name[][10]);

void Numas (long num[],int score[],int n,char name[][10]);

void Nameorder(long num[],int score[],int n,char name[][10]) ;

void Searchbyno (long num[],int score[],int n,int x,char name[][10]); void Searchbyname(long num[],int score[],int n,char c[],char name[][10]); void statistis (int score[],int n);

void List (long num[],int score[],int n,char name[][10]);

int main()

{

int n,score[N],c,x;

long num[N];

char name[N][10];

char y[10];

printf("输入学生人数");

scanf("%d",&n);

// getchar();

printf("1.Input record\n");

printf("2.Caculate totel and average score of every course\n");

printf("3.Sort in descending order by score\n");

printf("4.Sort in ascending order by score \n");

printf("5.Sort in ascending order by number\n");

printf("6.Sort in dictionary order by name\n");

printf("7.Search by number\n");

printf("8.search by name\n");

printf("9.Statistic analysis\n");

printf("10.List record\n");

printf("0.Exit\n");

printf("Please enter your choice:\n");

printf("\n");

for(;;)

{

scanf("%d",&c);

switch(c)

{

case 1: //录入学生学号和各科成绩

Input (num,score,n,name);

printf("Please enter your choice:\n");

break;

case 2: //计算每门课程的总分和平均分Totalave (score,n);

printf("Please enter your choice:\n");

break;

case 3: //按chengji由高到低排出名次表Scoredes (num,score,n,name);

printf("Please enter your choice:\n");

break;

case 4: //按chengji由低到高排出名次表Scoreas (num,score,n,name);

printf("Please enter your choice:\n");

break;

case 5: //按学号由小到大排出名次表Numas (num,score,n,name);

printf("Please enter your choice:\n");

break;

case 6: //按学号由小到大排出名次表Nameorder (num,score,n,name);

printf("Please enter your choice:\n");

break;

case 7: //按学号查询学生排名及其各科成绩

printf("请输入查找学号\n");

scanf("%d",&x);

Searchbyno (num,score,n,x,name);

printf("Please enter your choice:\n");

break;

case 8: //按姓名查询学生排名及其各科成绩

printf("请输入查找姓名\n");

getchar();

gets(y);

Searchbyname (num,score,n,y,name);

break;

printf("Please enter your choice:\n");

case 9: //成绩分析所占百分比statistis (score,n);

printf("Please enter your choice:\n");

break;

case 10: //全部输出

List (num,score,n,name);

printf("Please enter your choice:\n");

break;

相关文档
最新文档