// HigherLower.cpp : Defines the entry point for the console application. // #include int main() { //Declate integers int randnum = rand(10); int guess; char[50] user; //Ask for users name cout << "Hello, I don't know your name, who are you ?" << endl; cin >> user >> endl; cout << "Oh, Hi " << user << " let's start!" << endl; //Start main game cout << "I'm thinking of a number from 1 to 10, guess it, and you win!" << endl; cin >> guess; //Was the answer correct? if (guess = randnum) { cout << "Well done!" << endl; cout << "You chose " << guess << " and it was correct" << endl; return 0; } else { cout << "Sorry!" << endl; cout << "You chose " << guess << " but the actually number was " << randnum << endl; return 0; } }