I need to make a program that Write a program that has two numbers and then prints all the numbers that are between two given numbers, not including these numbers. Please help..
I'm not a fan of doing others' homework, so I'll just give you some ideas:
1) Once you have the two numbers, you will need to find both the largest number and the smallest number
2) Once you have those two, find a way to output the numbers in between (Hint: a count controlled loop is helpful here)
Notice that you yourself don't need to actually obtain the numbers in between yourself.
Just try it out, and if you come across any problems, let us know.
int a;
int b;
cout << "Write two numbers : \n";
cin >> a >> b;
while (a > b) &&(a < b)
{
cout << a << endl;
a++;
}
I dont know if I am doing it right, but this is where my brain shut down...
I need to know how to start while loop... I dont get it.. :(