For some reason the following code gives me a debug error. As far as I can see I typed it over with no mistakes from the book.
Please do not give me any other options of coding this piece. I would just like to know what the error refers to.
Code:
#include <iostream>
int main()
{
// ask for two numbers
// assign the numbers to BigNumber and SmallNumber
// If BigNumber is bigger then SmallNumber
// see if they are evenly devisible
// if they are, see if they are the same number
using namespace std;
int FirstNumber, SecondNumber;
cout << "Enter two numbers.\n First: ";
cin >> FirstNumber;
cout << "\nSecond: ";
cin >> SecondNumber;
cout << "\n\n";
if (FirstNumber >= SecondNumber)
{
if (FirstNumber % SecondNumber) == 0)
{
if (FirstNumber == SecondNumer)
cout << "They are the same!";
else
cout << "They are evenly divisable.";
}
else
cout << "They are not evenly devisable.";
}
cout << " Hey! The second one is larger.";
return 0;
}
Error:
error: expected primary-expression before '==' token
error: expected ';' before ')' token