请给我写那个程序 [英] plzz write me that program

查看:62
本文介绍了请给我写那个程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

struct cnode{
char cname[20];
short unit;
float grade;
cnode *nextcrs;//pointer to next address
};
*********************************
struct snode{
char fistname[10];
char lastname[15];
int stdno;
cnode *first crs;//pointer to the first address
snode*next std;//pointer to next student;
};
**********************************

snode*Best std(snode*p){  //pointer to first student
snode*q,*qmax;
cnode*r:
float max=0;
q=qmax=p;
while(q!=null){
r=q->firstcrs
float s=0;
int n=0;
while(r!=null){
s+=r->grade*r->unit
n+=r->unit;
r=r->nextcrs;
}
if(s/n)>max)
max=s/n;
qmax=q;
}
q=q->nextstd;
}
return  qmax;
}


*******************************************
在课堂上使用我想要的学生结构
通过菜单为用户提供以下功能的程序:
1名新学生注册
具有学生编号的学生的两门课程注册.
3-显示获得所需课程的学生列表.(按课程名称)
4-从指定学生中删除指定课程(按学生人数)
5打印指定学生的成绩(工作簿)(按学生编号)
指定课程的学生成绩的6列平均成绩.(按名称显示)

*请查看我编写的结构,并从结构中获取帮助以编写此程序.


***************************************
with use that up student''s struct in class i want
a program that give to user the following features by the menu:
1-new student registration
2-course(lesson)registration for students with student numbers.
3-show the list of student that recieved their desired course.(by name of course)
4-remove the specified course from specified student(by student number)
5-print the specified student''s result(workbook)(by student number)
6-print average of student''s grade in specified course.(by name cours)

* plz look to structs that i wrote and get help from structs to write this program.

推荐答案

我们不做作业:这是有原因的.在这里,您可以考虑自己被告知的内容,并尝试理解它.也可以在那里帮助您的导师识别您的弱点,并将更多的注意力放在补救措施上.

自己尝试,您可能会发现它比您想象的要容易.
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is easier than you think.


这篇关于请给我写那个程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆