Hello,
basically I'm trying to write a program where you ask the user to input 2 positive number. Then the program will print the lower of the two numbers to the higher of the 2 numbers and then higher of the 2 numbers to the lower of the 2 numbers. But I'm still stuck on the first part...
#include <iostream>
using namespace std;
int main()
{
int num1, num2, number=0;
cout<<"Please enter your first number"<<endl;
while (num1 >= number)
{
cin>>num1;
if(num1<number)
{
cout<<"Please enter a positive number"<<endl;
cin>>num1;
}
}
cout<<"Please enter you second number"<<endl;
while (num2<number)
{
cout<<"Please enter a positive number"<<endl;
cin>>num2
}
cin>>num2;
basically it does not distinguish if the number is positive or not...
and yes I'm still a beginner