need help

how can i be able make a program for these two statements
1 ask the user to enter two int values x and y
2 value returning function to add all the odd numbers between x and y
3 A void function to show each even number between x and y using cout
Last edited on
This not an answere to my question
It is just link for basics of c++
But still thank you
we prefer you to give it a try here.
this is 'my second program ever' type stuff. If you can't do this from your class notes, text book, and the web, you will not be able to complete your course and if we do it for you, you will fall behind so fast you won't have a chance.

that said, a tiny bit of help. It isn't exactly what was asked for on purpose. Try to modify it to do the first part.

int main()
{
int x;
cout << "enter a number and stuff" << endl;
cin >> x;
return 0;
}


Another hint: use modulus to determine whether a number is even or odd. Specifically, test if a number % 2 == 0.
mazan44 wrote:
This not an answere to my question
It is just link for basics of c++
But still thank you

It tells you what you need to know for part 1, and for some of part 3.

Since you weren't very specific about which parts of your program you're having trouble with, we can't know specifically what help you need.
Topic archived. No new replies allowed.