468,292 Members | 1,503 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,292 developers. It's quick & easy.

DEV C++ Need help......

I am not very familiar with C++, but simply trying to find answers for someone else. They are looking to create a program that will average scores utilizing the compiler DEV C++. Can anyone help, whether it be a head start on what to start writing, the program itself, or even point us in the right direction as to some good places on the internet to search? The individual is as much of a beginner as well so please don't get too complex.
Sep 18 '08 #1
3 1026
boxfish
469 Expert 256MB
So you're trying to make a program that takes some numbers (the scores) as input, adds them all up, divides by the number of scores, and prints out the result? You can use a double variable to keep a running total of all the scores, and int variable to keep track of the number of scores, make a loop that asks for scores until the user is done, then divide the total by the number of scores and print it out. Your program also needs some way of knowing when the user has given it all the scores.
Sep 18 '08 #2
Cool. Appreciate it. I'll try this out and let you know how it goes. Any other help is still more than welcome.
Sep 18 '08 #3
donbock
2,422 Expert 2GB
If your friend needs this program for practical reasons (rather than as a homework assignment) then I'd recommend using a spreadsheet. Much as I like to write software; that isn't always the best solution.
Sep 18 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by mike | last post: by
5 posts views Thread by John Flynn | last post: by
reply views Thread by xunling | last post: by
7 posts views Thread by Timothy Shih | last post: by
8 posts views Thread by skumar434 | last post: by
reply views Thread by U S Contractors Offering Service A Non-profit | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.