#include <iostream>
#include <string>
#include <time.h>

using namespace std;

int main()
{
    int number; //user's choice
	int i; //random number
	int answer;
	double rate;
	int playagain;
		do {
			srand (time(NULL));
			i = rand () %1000+1; //sets up randnumgen from 1-1000
				do {
					cout<< "Guess the secret number between 1 and 1000: ";
					scanf ("%d", &number);
					if (i>number) 
						cout<<"The secret number is higher\n";
					else if (i<number) 
						cout<<"The secret number is lower\n";
				} while (i!=number); //prompts the user to input a number until the correct number is choosen

				cout<<"YOU WIN!!!\n";

		do {
			cout<<"Did you enjoy the game? (1 for Yes or 2 for No)\n";
			cin>> answer;
			if (answer==1)
				cout<<"Thank you! Please play again! Enter a rating (1-10)\n";
			else if (answer==2)
				cout<<"Well, FUCK YOU!!!!!!! Try again\n";
			else 
				cout<<"That wasn't an option, fag. Try again\n";
		} while (answer!=1); //prompts user about whether or not they like the game until they say yes
	
		do {
			cin>> rate;
	
			if (rate<9)
				cout<<"You suck, asshole! Enter a real rating, bitch.\n";
			else
				cout<<"Thanks for rating!"<<endl;
		} while (rate<9); //prompts user to rate game until they say 9 or higher  LOLZ--do it for them

		do {
		cout<<"Do you want to play again? (1 for Yes or 2 for No)\n";
		cin>> playagain;
		if (playagain==1)
			cout<<"Okay! Have fun!\n";
		else if (playagain==2)
			cout<<"Okay! Thanks for playing!\n";
		else
			cout<<"That wasn't an option. Please press 1 for Yes or 2 for No.\n";
		} while (playagain>2);

	} while (playagain==1);

	return 0;
}