// The program will read two integers form the user's input and compare those //
// two integers and subtract the smaller integer number from the large integer number. //
#include <iostream>
usingnamespace std;
int main()
int first;
int second;
int difference;
int different;
cout << "Enter the first integer number ";
cin >> first;
cout << "Enter the second integer number ";
cin >> second;
if (first < second)
{
different = second - first;
cout << "You entered ";
cout << second << " and " << first << endl;
cout << "The difference between the second number and the first number is ";
cout << different << endl;
}
else
{
difference = first - second;
cout << "You entered ";
cout << first << " and " << second << endl;
cout << "The difference between the first number and the second number is ";
cout << difference << endl;
}
return 0;
}
No problem! I understand completely how hard it is to see one little thing amongst the rest of your code. You were very, very close to finished, though, so good job!