#include <string>
#include <iostream> 
#include <sstream>

using namespace std;



int main(int argc, char *argv[])
{

	stringstream stream;
	string input = "";

	int playerOne[7];
	string playerTwo[7];
	cout << "Please enter the first number" << endl;

	getline(cin, input);
	stream.str(input);
	stream >> playerOne[0];
	stream.clear();

	cout << "Please enter the second number" << endl;
	getline(cin, input);
	stream.str(input);
	stream >> playerOne[1];
	stream.clear();

	cout << "Please enter the third number" << endl;
	getline(cin, input);
	stream.str(input);
	stream >> playerOne[2];
	stream.clear();

	cout << "Please enter the fourth number" << endl;
	getline(cin, input);
	stream.str(input);
	stream >> playerOne[3];
	stream.clear();

	cout << "Please enter the fifth number" << endl;
	getline(cin, input);
	stream.str(input);
	stream >> playerOne[4];
	stream.clear();

	cout << "Please enter the sixth number" << endl;
	getline(cin, input);
	stream.str(input);
	stream >> playerOne[5];
	stream.clear();

	cout << "Please enter the seventh number" << endl;
	getline(cin, input);
	stream.str(input);
	stream >> playerOne[6];
	stream.clear();

	system("CLS");



	cout << "Player 1's first number is " << playerOne[0] << endl;

	cout << "Will the next number be higher or lower than the previous - H/L" << endl;
	getline(cin, playerTwo[0]);
	if (playerTwo[0] == "L")
	{
		if (playerOne[0] < playerOne[1])
		{
			cout << "You are wrong :(" << endl;
			exit(0);
		}
		if (playerOne[0] > playerOne[1])
		{
			cout << "You are right :)" << endl;
		}
	}
	if (playerTwo[0] == "H")
	{
		if (playerOne[1] > playerOne[0]) {
			cout << "You are right :)" << endl;
		}
		else if (playerOne[1] < playerOne[0]) {
			cout << "You are WRONG :(" << endl;
			exit(0);
		}


		cout << "Will the next number be higher or lower than the previous - H/L" << endl;
		getline(cin, playerTwo[0]);
		if (playerTwo[0] == "L")
		{
			if (playerOne[1] < playerOne[2])
			{
				cout << "You are wrong :(" << endl;
				exit(0);
			}
			if (playerOne[1] > playerOne[2])
			{
				cout << "You are right :)" << endl;
			}
		}
		if (playerTwo[0] == "H")
		{
			if (playerOne[2] > playerOne[1]) {
				cout << "You are right :)" << endl;
			}
			else if (playerOne[2] < playerOne[1]) {
				cout << "You are WRONG :(" << endl;
				exit(0);
			}
		}
		cout << "Will the next number be higher or lower than the previous - H/L" << endl;
		getline(cin, playerTwo[0]);
		if (playerTwo[0] == "L")
		{
			if (playerOne[2] < playerOne[3])
			{
				cout << "You are wrong :(" << endl;
				exit(0);
			}
			if (playerOne[2] > playerOne[3])
			{
				cout << "You are right :)" << endl;
			}
		}
		if (playerTwo[0] == "H")
		{
			if (playerOne[3] > playerOne[2]) {
				cout << "You are right :)" << endl;
			}
			else if (playerOne[3] < playerOne[2]) {
				cout << "You are WRONG :(" << endl;
				exit(0);
			}
		}
		cout << "Will the next number be higher or lower than the previous - H/L" << endl;
		getline(cin, playerTwo[0]);
		if (playerTwo[0] == "L")
		{
			if (playerOne[2] < playerOne[3])
			{
				cout << "You are wrong :(" << endl;
				exit(0);

			}
			if (playerOne[2] > playerOne[3])
			{
				cout << "You are right :)" << endl;
			}
		}
		if (playerTwo[0] == "H")
		{
			if (playerOne[3] > playerOne[2]) {
				cout << "You are right :)" << endl;
			}
			else if (playerOne[3] < playerOne[2]) {
				cout << "You are WRONG :(" << endl;
				exit(0);
			}
		}
		cout << "Will the next number be higher or lower than the previous - H/L" << endl;
		getline(cin, playerTwo[0]);
		if (playerTwo[0] == "L")
		{
			if (playerOne[3] < playerOne[4])
			{
				cout << "You are wrong :(" << endl;
				exit(0);
			}
			if (playerOne[3] > playerOne[4])
			{
				cout << "You are right :)" << endl;
			}
		}
		if (playerTwo[0] == "H")
		{
			if (playerOne[4] > playerOne[3]) {
				cout << "You are right :)" << endl;
			}
			else if (playerOne[4] < playerOne[3]) {
				cout << "You are WRONG :(" << endl;
				exit(0);
			}
		}
		cout << "Will the next number be higher or lower than the previous - H/L" << endl;
		getline(cin, playerTwo[0]);
		if (playerTwo[0] == "L")
		{
			if (playerOne[4] < playerOne[5])
			{
				cout << "You are wrong :(" << endl;
				exit(0);
			}
			if (playerOne[4] > playerOne[5])
			{
				cout << "You are right :)" << endl;
			}
		}
		if (playerTwo[0] == "H")
		{
			if (playerOne[5] > playerOne[4]) {
				cout << "You are right :)" << endl;
			}
			else if (playerOne[5] < playerOne[4]) {
				cout << "You are WRONG :(" << endl;
				exit(0);
			}
		}
		cout << "Will the next number be higher or lower than the previous - H/L" << endl;
		getline(cin, playerTwo[0]);
		if (playerTwo[0] == "L")
		{
			if (playerOne[5] < playerOne[6])
			{
				cout << "You are wrong :(" << endl;
				exit(0);
			}
			if (playerOne[5] > playerOne[6])
			{
				cout << "You are right :)" << endl;
			}
		}
		if (playerTwo[0] == "H")
		{
			if (playerOne[6] > playerOne[5]) {
				cout << "You are right :)" << endl;
			}
			else if (playerOne[6] < playerOne[5]) {
				cout << "You are WRONG :(" << endl;
				exit(0);
			}
		}




	}






	/*
	if (answer == rightAnswer)
	{
		cout << "You are right :)" << endl;
	}

	else
	{
		cout << "You are wrong :(" << endl;
	}
	*/




	system("Pause");

	return 0;
}