The problem is that you've got a random 'else' statement, and the code that you've got isn't really correct.... for example:
Code:
if ( (firstNumber % secondNumber) == 0) // evenly divisible?
std::cout << "They are the same!\n";
that's not correct, you even say that you're checking whether they are evenly divisible in your comment.
added a few more things for you to learn:
Code:
#include <iostream>
int main() {
int a, b;
std::cout << "Enter two numbers." << std::endl << std::endl;
std::cout << "First: ";
std::cin >> a;
std::cout << "Second: ";
std::cin >> b;
if (!a % b) // 0 is classed as a falsy, so if the answer is 0, !false = true, so this will be evaluated
std::cout << "They are evenly divisible!";
else if (a > b)
std::cout << "a is greater than b!";
else if (a < b)
std::cout << "b is greater than a!";
else
std::cout << "They are the same!"
return 0;
}
~ Craig`