#include<iostream>
#include<cstdlib>
#include<ctime>
usingnamespace std;
int main()
{
srand(time(0));
int number=rand()%100+1;
int guess, tries(1);
cout<<"Im thinking of a number between 1-100. Take a guess: ";
cin>>guess;
while(guess!=number)
{
tries++;
if(guess>number)
cout<<"Too high,Guess again: ";
else
cout<<"Too low, Guess again: ";
cin>>guess;
}
cout<<"Congrats!! You got it after "<< tries << " tries." <<endl;
return 0;
}