c语言作业转换等级成绩,c语言大作业——学生成绩管理系统v2.0(9页)-原创力文档...

//成绩管理系统v2.0

#include 

#include <stdlib.h>

#define N 30

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

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

void Scoredes (long num[],int score[],int n,int (*compare)(int a,int b));

int Ascending (int a,int b);

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

void Search (long num[],int score[],int n,int x);

void statistis (long num[],int score[],int n);

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

int main()

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

long num[N];

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

scanf("%d",&n);

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

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

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

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

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

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

printf("7.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);

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

break;

case 2:

Totalave (score,n);

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

break;

case 3:

Scoredes (num,score,n,Ascending);

for(i=0;i<n;i++)

printf("ID:%10ld,score:%d\n",num[i],score[i]);//以长整形打印用%ld

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

break;

case 4:

Numas (num,score,n);

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

break;

case 5:

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

scanf("%d",&x);

Search (num,score,n,x);

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

break;

case 6:

statistis (num,score,n);

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

break;

case 7:

List (num,score,n);

Totalave (score,n);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值