It is asking for me to modify the program so that the user inputs both values to be tested for equality. Make sure you have a prompt for each input. Test the program with pairs of values that are the same and that are different. So where do i start on this question?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// This program tests whether or not an initialized value
// is equal to a value input by the user
// PLACE YOUR NAME HERE
#include <iostream>
usingnamespace std;
int main( )
{
int num1, // num1 is not initialized
num2 = 5; // num2 has been initialized to 5
cout << "Please enter an integer" << endl;
cin >> num1;
cout << "num1 = " << num1 << " and num2 = " << num2 << endl;
if (num1 == num2)
cout << "Hey, that’s a coincidence!" << endl;
if (num1 != num2)
cout << "The values are not the same" << endl;
return 0;
}