Quick c++ program i made

#include <iostream>

using namespace std;

int main(){
int a, b;

cout << "Enter your favorite number " << endl;
cin >> b;
cout << "Enter another number you love " << endl;
cin >> a;

if(a<b){
cout << "Your first number was larger " << endl;
cout << "Their diffrent is: " << b-a << endl;

}
system("pause");
return 0;



}
Was there something you wanted?
OK, nice program. Do you have a problem, or do you want suggestions? BTW please use code tags. http://www.cplusplus.com/search.do?q=using+code+tags

If b is smaller than a, then your program will do nothing. (You may want to do the same thing that you did with a<b except opposite.

I see you are new (4 posts) so I wanted to welcome you to the forum. :D
Topic archived. No new replies allowed.