even i type another cases still not work but my friend type as the same thing and he work , he doesn't need another cases at all.
my homework is to write a program that asks the user to enter two integers , obtains the numbers from the user , then prints the larger number followed by the words "is larger."if the numbers are equal, print the message "these numbers are equal."
cout << "Enter two integers to compare: ";
cin >> number1 >> number2;
if (number1 == number2)
cout << number1 << " == " << number2 << endl;
if (number1 > number2)
cout << number1 << " > " << number2 << endl;
cout << "Phone a friend\n";
Enter two integers to compare: 2
2 == 2
Phone a friend
Also I don't think it is a good idea to have cin >> .. >> ..
It's better to have two separate cout prompts and two separate cin's, one after each prompt. That way you get some feedback instead of a blank screen until you get the input right.