李心艾8分钟种子 mp4:C语言作业大家帮帮啊!!!!

来源:百度文库 编辑:高考问答 时间:2024/05/05 08:46:58
编写一个学生成绩管理的程序.
要求:
30个学生,每个学生有5门课程.
输入课程代号后,能输出该课程的平均分
输入学号后,能输出该学生的各科成绩能及平均分.
能输出各门课程指定分数段的学号和成绩以及在此分数段内的学生人数.
能输出指定课程中不及格学生的学号及人数
能输出任何一门课程不及格的学号及人数\成绩
能把任何一门课的成绩按从高到低的顺序排序
每个功能都必须用一个函数来实现.

<<只要符合我的要求!在能运行!就能分!!!!!!>>
谢了!!!!
老要求尽量用指针啊!!!!
在说老哥你这个也不对啊!!!!不说光运行不了!
还少一个排序的功能!
那就我在这也谢谢了!!!

void Course(float x[5][30])
{
int i,j;
float m=0;
printf("Please input the code name of course\n");
scanf("%d",&i);
for(j=0;j<30;j++)
m+=x[i][j];
m/=30;
printf("The average mark of course that you input is %f\n",m);
}
void Student(float x[5][30])
{
int i,j;
float m=0;
printf("Please inputs the student number\n");
scanf("%d",&j);
for(i=0;i<5;i++)
{printf("%f ",x[i][j];
m+=s[i][j];}
printf("\n");
m/=5;
printf("You input the student number average result is %f\n",m);
}
void Mark(float x[5][30])
{
int i,j,m=0;
float Small,big;
printf("Please input the code name of course\n");
scanf("%d",&i);
printf("Please inputs the minimum value\n");
scanf("%f",&Small);
printf("Please inputs the maximum value\n");
scanf("%f",&Big);
for(j=0;j<30;j++)
{if(x[i][j]>=Small&&x[i][j]<=big)
{m+=1;
printf("Student number is %d Result is %f\n",j,x[i][j]);}
}
printf("Population is %d\n",m)
}
void Fail(float x[5][30])
{
int i,j,m=0;
float Points;
printf("Please input the code name of course\n");
scanf("%d",&i);
printf("Please inputs passes an examination the points");
scanf("%f",&Points);
for(j=0;j<30;j++)
{
if(x[i][j]<Points)
{printf("Does not pass an examination the student number");
printf("%d ",j);
m+=1;}
}
printf("\n");
printf("Does not pass an examination the population is %d\n",m)
}
void Sequencing(float x[5][30])
{
int i,j,n;
float m=0;
printf("Please input the code name of course\n");
scanf("%d",&i);
for(n=1;n<30;n++)
for(j=0;j<30-n;j++)
{if(x[i][j]<x[i][j+1])
{m=x[i][j];
x[i][j]=x[i][j+1];
x[i][j+1]=m;}
}
for(j=0;j<30;j++)
printf("%f\n",x[i][j]);
}
#include <stdio.h>
void main()
{
int i,j,m;/*i为课程号,0为语文,1为数学,2为英语,3为物理,4为化学,j为学号,从0到29*/
float s[5][30];
for(i=0;i<5;i++)
for(j=0;j<30;j++)
{switch(i)
{
case 0:Please input Chinese achievement;break;
case 1:printf("Please input mathematics achievement\n");break;
case 2:printf("Please input English achievement\n");break;
case 3:printf("Please input physics achievement\n");break;
case 4:printf("Please input chemistry achievement\n");break;
default:printf("\n");
}
while(1)
{printf("Please input the project serial number that you want to operate\n");
scanf("%d",&m);
switch(m)
{
case 0:Course(s);break;
case 1:Student(s);break;
case 2:Mark(s);break;
case 3:Fail(s);break;
case 4:Sequencing(s);break;
default:printf("Input the mistake, please input again\n");
}
}
}

和交换机

分太低

5分也太小气了吧

原来作业也可以这样做呀,,,知道了.呵呵