1. ## Help

Can someone that is good with programming C++ (entry level programming)
Help me with this problem: (also see attachment)

Write a program that reads two integers num1 and num2 from the user, then displays the total of the all
of the numbers between num1 and num2 (inclusive). Your program should handle the following:
1. Make sure the numbers entered are between 0 and 100.
2. Make sure the second number is greater than or equal to the first number entered.

Note that the first number the user enters is the low end of the range for the second number. So, as an
Please enter an integer between 0 and 100: 25
Please enter an integer between 25 and 100: 75
The total of the integers between 25 and 75 is 2550
Note that you have to CHECK THAT THE NUMBERS ARE IN RANGE BEFORE TRYING TO DO THE LOOP!

2. Post the code you have started with.

3. I don't have access to private message. can you message me?

4. Use the forum.

5. you should say to your professor at school that using system pause is a bad habit

if he has any objections direct him to this site:

IP Banned - GIDNetwork

6. all I don't understand what operator should I use between num1 and num2

I did your homework in less than 30 min ---->>> BUT I'M NOT GIVING YOU JUST LIKE THAT

learn C++

7. Ok, I am completely stuck, as I don't really fully understand integers.

so far I have:
-----------------------------------------------------------

#include <iostream>

using namespace std;

int main()
{
int num1;
int num2;

cout << "Please enter an integer between 0 and 100: ";
cin >> num1;

cout << "Please enter an integer between 50 and 100: ";
cin >> num2;

integer counter = num1, total = 0;

while (counter <= num2)

total = total + counter;
counter++;

cout << "The total of the intergers between " << num1 << " and " << num2 << " is " << total << end;

----------------
I am hoping I am on the right path, but I have to incorporate the "IF's" in there as well if the numbers are not in range and should say " Please read and follow the directions!"

So I am thinking somewhere in there, I have to add:

and

I am stuck and running out of time.

8. first: you don't have braces around the body of your while loop.

second: why are you looping a subtraction operation?

9. Code:
```cout << "Please enter an integer between 0 and 100: ";
cin >> num1;

cout << "Please enter an integer between 50 and 100: ";```
what about if I press 30 in the first num1???

than it wouldn't be 50 right

you must correct there that it will show you the variable you have pressed

try to repair that and show your code again

10. If you don't understand integers, you're probably in the wrong class.

is not the same thing as
Originally Posted by the assignment
Make sure the second number is greater than or equal to the first number entered.
Emphasis mine.

11. Its not a subtraction problem. In my first post, see the attachment of the assignment description.

As far as the brackets, I realize I am missing those, I am looking for help with the total picture, and getting it right.

12. you should use a for loop.

Code:
```int total;
for(int counter=num1;counter<num2;counter++)
{
total+=counter;
}```
put your if statements between this and the input prompts. you should be familiar with inequality operations; they equate to either true or false conditions. the logic of using an if statement is very simple:

Code:
```if(condition)
{
statements
}```

13. You guys are great. thank you. Ok, so this is what I have:
-------------------------------------------
Code:
```#include <iostream>

using namespace std;

int main()
{
int num1;
int num2;

cout << "Please enter an integer between 0 and 100: ";
cin >> num1;

cout << "Please enter an integer between 50 and 100: ";
cin >> num2;

int total;
for(int counter=num1;counter<num2;counter++)
{
total+=counter;
}
{
}
{
}

cout << "The total of the intergers between " << num1 << " and " << num2 << " is " << total << end;```
-------------------------------------------

Am I correct? My assignment is attached to my first post here. I just want to make sure I have everything perfect to all the instructions.

thank!

14. no, your syntax is not correct.

as a matter of principle, your if statements should proceed your loop also. why compute an invalid number?

15. You lost me... I am brand new to this. please explain