need a help in ( for , while )

hello guys
can you help me in writing this program :

Write a program that reads number until the number 1001 is entered. After that output the summation of the all positive grades, all negative grades, all odd grades, all even grades, the counter number of each one of them, the counter of all zero’s, and finally the counter of all numbers (the number 1001 will not be included).

Use:
a. While Statement
b. Do, While Statement
b. For Statement

To stop the loop you must use break only.

Sample:
Input your number, 1001 to stop: 5
Input another number: -3
Input another number: 4
Input another number: 0
Input another number: 0
Input another number: 11
Input another number: 18
Input another number: -6
Input another number: 8
Input another number: 1001
End:
Summation of Odd numbers = 13
Number of odd numbers = 3
Summation of Even numbers = 24
Number of Even numbers = 6
Summation of Positive numbers = 46
Number of Positivenumbers = 7
Summation of Negative numbers = -9
Number of Negativenumbers = 2

closed account (2LzbRXSz)
Do you have any code so far? Do you need help on where to start?
i don't have anything ,
all i need is the code of this program
This forum does not do homework for you (or at least it's not supposed to). You have to make an attempt, show your code, then ask questions about what you tried and what didn't work (or something similar to that). Then we can actually help you learn rather than just do your work for you.

If you have no idea where to start, try breaking it down into smaller steps and write code just to solve that one step. For example, you could start with a program that reads one number, and that's it.
closed account (2LzbRXSz)
Just trial and error and let us know what you come up with. If you're really stuck, I can give you a few pointers.
Topic archived. No new replies allowed.