#include <iostream>
usingnamespace std;
void numberOneEval(int x) {
if (x % 2 == 0) {
cout << x << " is even." << endl;
}
else {
cout << x << " is odd." << endl;
}
}
void numberTwoEval(int y) {
if (y % 2 == 0) {
cout << y << " is even." << endl;
}
else {
cout << y << " is odd." << endl;
}
}
int main() {
int number_1, number_2;
int difference;
cout << "I will now perform a few operations upon the entrance of two integers provided by you." << endl;
cout << "Proceed by entering one at a time." << endl;
cin >> number_1;
cout << "Okay, great. Now the second integer value." << endl;
cin >> number_2;
if (number_1 > number_2) {
difference = number_1 - number_2;
}
if (number_2 > number_1) {
difference = number_2 - number_1;
}
if (number_1 == number_2) {
difference = number_1 - number_2;
}
cout << "The difference between the two is " << difference << "." << endl;
if (difference % 2 == 0) {
cout << "The difference is even." << endl;
return 0;
}
if (difference % 2 != 0) {
cout << "The difference is odd." << endl;
return 0;
}
numberOneEval(difference);
numberTwoEval(difference);
return 0;
}
Yeah sorry about that! I have to take two numbers, discern between which one is greater than the other, calculate the difference, state if the numbers entered are even or odd and then state whether or not the difference is even or odd.