Click here to Skip to main content
15,886,713 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
C++
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;
}

***************************************
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.
Posted
Updated 3-Jan-12 6:36am
v3
Comments
Sergey Alexandrovich Kryukov 3-Jan-12 12:37pm    
I don't see a bit of C++ here. Why would anyone write it for your? You did not even explain what is your problem and did not probably try to write it by yourself.
--SA
Member 8536504 3-Jan-12 13:04pm    
i don't have any idea to write tht program. it;s an assingment from college. plzzz help
Richard MacCutchan 3-Jan-12 13:11pm    
I would suggest you go back to your notes and study a bit more.
fjdiewornncalwe 3-Jan-12 13:34pm    
You have it backwards. You are in school to learn, and learning requires effort. Make that effort and try to write your application. When you get stuck on a specific thing, then ask a specific question and we will be glad to help at that point.
RaviRanjanKr 3-Jan-12 14:28pm    
you please don't use short messaging text like 'plzz' instead of 'please' while questioning and answering. :)

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900