I'm really confused on where to start on a program I'm supposed to build. It is meant to average 15 user-input grades and then from there I have to provide the letter grade that corresponds with the average percent. I understand how to provide the corresponding letter grade, but I don't understand how to get the average. I've tried putting it into arraylist format, but I'm getting myself confused.
I'm a new programmer, with a teacher who won't answer my e-mails. If someone could steer me in the right direction, it would be amazing!
Thank you!
4 Replies - 954 Views - Last Post: 05 June 2011 - 05:21 PM
#1
Averaging 15 user-input grades and then telling the letter grade
Posted 05 June 2011 - 02:41 PM
Replies To: Averaging 15 user-input grades and then telling the letter grade
#2
Re: Averaging 15 user-input grades and then telling the letter grade
Posted 05 June 2011 - 03:35 PM
Get 15 inputs from user, you can store them into array then sum them all and divide the sum by 15, then this is the average of 15 inputs
#3
Re: Averaging 15 user-input grades and then telling the letter grade
Posted 05 June 2011 - 03:37 PM
How do you figure out an average? Uhhh... sum up the 15 values and divide by 15 perhaps? So create a loop that asks the user for a score 15 times. On each pass add it to a running total. After the loop is done, divide that total by 15 to get an average.
#4
Re: Averaging 15 user-input grades and then telling the letter grade
Posted 05 June 2011 - 04:00 PM
You'll want to refresh yourself on the mean, or average it's really not complex at all. Good way is to loop through a block of code asking for input, you'll want to keep track of the count, and then perform the simple arithmetic when your count reaches 15. Simple.
#5
Re: Averaging 15 user-input grades and then telling the letter grade
Posted 05 June 2011 - 05:21 PM
Thank you all for your help! I don't know why I didn't think to loop it in the first place, it seems so obvious now.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|