oddNeven program having trouble adding on.

Pages: 12
Have a look at my code, and compare it to yours. Instead of using cin >> i I am using a more robust method. So if someone enters some invalid input you don't end up in an infinite loop.
Oh so thats the hole program? i compiled it and got an error. i under stand what your saying.
It's not the whole program. I'm showing you a better way to take the input for your program.
I'm just having trouble switching that with my old section.
If so, You are not understanding the differences between the code. In which case I'd suggest you re-read through tutorials on Functions and If Statements. Then have a read through C++ IO (IOStreams).

Your trying to do something that is currently our of your knowledge level, and if you do accomplish it I feel it'll be by trial and error (and luck) more than learning to solve the problem.
Yeah, i said earlier that i was going back to the bigining of my book to re read thing's.
Topic archived. No new replies allowed.
Pages: 12