#include<iostream>
#include<cstdlib>
using namespace std;


int main()
{
 // Initialize random-number generator
 srand(time(0));


 // Generate random number
 int randNum=(rand()%10)+1, userGuess;


 // Get guess from user
 cout << "Guess what number I have chosen! ";
 cin >> userGuess;


 // Tell user if s/he has guessed correctly
 if(userGuess==randNum)
   cout << "Correct!\n";
 else
   cout << "Sorry, better luck next time!\n";


 return 0;
}