Oyegun Augustine Csc110 4 21 19 Program Take Two Numbers User State Whether Equal Includ Q37177798

// Oyegun A. Augustine, CSC110, 4/21/19
//A program that will take two numbers from user and state whetherthey are equal or not.
#include <iostream>

using namespace std;

bool TestEqual(int x, int y) {
return x == y;
}

int main() {
//Declare variables
cout << “TestEqual num1, num2” << endl;
int x;
//Prompt user for first number
cout << “Enter num1: “;
cin >> x;
cout << “” << endl;
int y;
//Prompt user for second number
cout << “Enter num2: “;
cin >> y;
//Output
if (TestEqual(x, y)) {
cout << “The two numbers are equal” << endl;
} else {
cout << “The two numbers are not equal” << endl;
}

}

  • Q: If you changed one of the variable valuesin your function, would
    OR
    OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.