|
-
September 21st, 2008, 09:41 PM
#6
Re: Help!
You'd need to input the 10 numbers into separate variables (typically an array of size 10), and then have two loops: One to read the values, and the second to operate on them.
However, there's an easier way to adjust the code to acheive the same result: Do the calculations as-you-go (no need for an array or a second loop), but just move the cout statement of the result outside the loop.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|