#include <iostream>
using namespace std;
int main ()
{
int number=54;
int answer;
cout << "I'm thinking of a number from one to one hundred./n";
cout << "Can you guess it?/n";
cin >> answer;
if (answer<number)
cout << "Higher./n";
cin >> answer;
else if (answer>number)
cout << "Lower./n" ;
cin >> answer;
else
cout << "You got it! The answer is ";
cout << answer << "!";
system ("PAUSE");
return 0;
}
Above is a code for a guessing game I am working on in which the player must guess correctly guess the number the computer is thinking of (54).
I don't know what I did wrong. I use visual c++.
Help?