Write a program that selects a secret random number between 0 and 99.
Then it repeatedly asks the user to guess what the number is (until the guess it correctly).
So, e.g. if the program selected 7 as the secret number then the user might see
Enter your guess: 3
Enter your guess:4
Enter your guess:9
Enter your guess:7
You Got it!.....
Program does not end when the user guesses the correct answer, thats the problem.
This is what i have so far.......
using namespace std;
int main ()
int r= rand()%5;
cout<<"Guess the random number"<<endl;
cout<<"Enter your guess"<<" ";
if (n!=r) cout<<"Wrong!"<<endl;
else if (n=r) cout<<"You got it!"<<endl;