Loop Program Wont work right..Help me please!

Reply

Join Date: Sep 2005
Posts: 6
Reputation: 123abc is an unknown quantity at this point 
Solved Threads: 0
123abc 123abc is offline Offline
Newbie Poster

Loop Program Wont work right..Help me please!

 
0
  #1
Nov 21st, 2005
For research, the admissions office wants to compare how well female and male students perform in certain courses. You are asked to write a program that prompts the user to enter a number of student records consisting of (a) student’s sex (‘f’ for female, ‘m’ for male) and (b) GPA (a number in the range of 0.0 – 4.0) for each student.

The program should prompt the user to enter a letter code for the student’s sex (f or m), followed by the GPA value. The program should continue processing student records until the user enters a letter code other than ‘f’ or ‘m’ (handle both upper and lower case input)—this will indicate that there are no more student records to process.

The program should tabulate the following information:
- total number of female students
- average female student’s GPA
- total number of male students
- average male student’s GPA
- total number of students
- overall student GPA (males and females combined)



Sample Input Data

f 3.40
f 2.83
m 3.21
f 4.00
m 3.12
m 2.10
m 3.42
f 3.80
f 3.25
q (A letter code other than m or f indicates to QUIT)

Sample Program Output

Female students....... 5
Female Avg GPA ....... 3.46
Male students ........ 4
Male Avg GPA ......... 2.96
Overall Avg GPA ...... 3.24

----------------------------------
For some reason my code doesnt give me the right results? i would post my code but i know alot of people from my class come on here for help, so if anyone would be willing to help me please reply and ill pm you my code
thanks
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 219
Reputation: BountyX is an unknown quantity at this point 
Solved Threads: 8
BountyX's Avatar
BountyX BountyX is offline Offline
Code Guru

Re: Loop Program Wont work right..Help me please!

 
0
  #2
Nov 21st, 2005
let me take a look.
A Hacker's Mind:
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes..." - J.D.Salinger
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 598
Reputation: SpS is on a distinguished road 
Solved Threads: 32
SpS's Avatar
SpS SpS is offline Offline
Posting Pro

Re: Loop Program Wont work right..Help me please!

 
0
  #3
Nov 21st, 2005
Originally Posted by sam_dee
Need Programming Help try
link removed
Enjoy
Stop Spamming The Forum
Last edited by Narue; Nov 21st, 2005 at 9:33 am.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 598
Reputation: SpS is on a distinguished road 
Solved Threads: 32
SpS's Avatar
SpS SpS is offline Offline
Posting Pro

Re: Loop Program Wont work right..Help me please!

 
0
  #4
Nov 21st, 2005
Originally Posted by 123abc
For some reason my code doesnt give me the right results? i would post my code but i know alot of people from my class come on here for help, so if anyone would be willing to help me please reply and ill pm you my code
plz post your code here for everyone to see
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 6
Reputation: 123abc is an unknown quantity at this point 
Solved Threads: 0
123abc 123abc is offline Offline
Newbie Poster

Re: Loop Program Wont work right..Help me please!

 
0
  #5
Nov 22nd, 2005
Originally Posted by sunnypalsingh
Stop Spamming The Forum
how am i spamming the forum?
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 1,496
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Solved Threads: 104
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

Re: Loop Program Wont work right..Help me please!

 
0
  #6
Nov 22nd, 2005
Originally Posted by 123abc
how am i spamming the forum?
he he he :cheesy:. Sunny didnt mean you dude. Didnt you see the quote in his message? It was meant for that advertising fellow sam_dee who was trying to promote some company, maybe his, in these threads.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC