|
-
November 1st, 2009, 08:07 PM
#1
Multiple Inputs
I know this is probably a really easy question, but my teacher failed to mention how to do it, so here goes.
I'm making a simple program that tells a user if a sequence of given numbers are even or odd. Here's what the program should look like:
Code:
Enter a sequence of numbers (0 to quit): 12 4 19 3 0
12 is even
4 is even
19 is odd
3 is odd
I've gotten the program made, except my output stops at "12 is even".
My question is, how do I get my program to loop through all of the numbers and stop at 0?
I tried using a while loop,
But, it just looped "12 is even" over and over.
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
|