Here is the code for Exercise 1
//exercsise 1

//libraries

#include <iostream>
#include <sstream>
#include <stdio.h>

using namespace std;

int main(int argc, char** argv)
{
	stringstream stream;
	string input = "";

	double num1, num2, num3, num4, num5, num6, num7, num8, num9, num10, num11, num12, num13;


	//game will start with having player 1 entering their 7 numbers
	cout << "This is a two player game, Player 1 will take their turn" << endl;
	cout << "Hint, use numbers between 1 and 9" << endl;
	cout << "Please enter 7 numbers: " << endl;

	cout << "Please enter the first number: " << endl;

	getline(cin, input);
	stream.str(input);
	stream >> num1;
	stream.clear();

	cout << "Please enter the second number: " << endl;

	getline(cin, input);
	stream.str(input);
	stream >> num2;
	stream.clear();

	cout << "Please enter the next number: " << endl;

	getline(cin, input);
	stream.str(input);
	stream >> num3;
	stream.clear();;

	cout << "Please enter the next number: " << endl;

	getline(cin, input);
	stream.str(input);
	stream >> num4;
	stream.clear();

	cout << "Please enter the next number: " << endl;

	getline(cin, input);
	stream.str(input);
	stream >> num5;
	stream.clear();

	cout << "Please enter the next number: " << endl;

	getline(cin, input);
	stream.str(input);
	stream >> num6;
	stream.clear();

	cout << "Please enter the next number: " << endl;

	getline(cin, input);
	stream.str(input);
	stream >> num7;
	stream.clear();

	cout << "Player 2, please guess the numbers entered by Player 1" << endl;

	cout << "The first value is :" << num1 << endl;

	cout << "Please guess a number higher or lower: " << endl;

	getline(cin, input);
	stream.str(input);
	stream >> num8;
	stream.clear();

	if (num8 < num2)
	{
		cout << "The value is lower than the number, well done, the value is : " << num2 << endl;
		{
			if (num8 > num2)
			{
				cout << "This is incorrect, player 1 wins: " << endl;
				exit;
			}

		}

	}

	cout << "Please guess the third number: " << endl;
	getline(cin, input);
	stream.str(input);
	stream >> num9;
	stream.clear();

	if (num9 > num3)
	{
		cout << "The value is higher than the number, the value is :" << num3 << endl;
	}
	else
	{
		cout << "This is incorrect, player 1 wins: " << endl;
		exit;
	}

	cout << "Please guess the next number: " << endl;

	getline(cin, input);
	stream.str(input);
	stream >> num10;
	stream.clear();

	if (num10 > num4)
	{
		cout << "The value is higher than the number, the value is :" << num4 << endl;
	}
	else
	{
		cout << "This is incorrect, player 1 wins: " << endl;
		exit;
	}

	cout << "Please guess the next number: " << endl;

	getline(cin, input);
	stream.str(input);
	stream >> num11;
	stream.clear();

	if (num11 < num5)
	{
		cout << "Well done, the number is smaller, the value is" << num5 << endl;
	}
	else
	{
		cout << "This is incorrect, player 1 wins: " << endl;
		exit;
	}

	cout << "Please guess the next number: " << endl;

	getline(cin, input);
	stream.str(input);
	stream >> num12;
	stream.clear();

	if (num12 < num6)
	{
		cout << "Well done, the number is smaller, the value is: " << num6 << endl;
	}
	else
	{
		cout << "This is incorrect, player 1 wins: " << endl;
		exit;
	}

	cout << "Please guess the next number: " << endl;

	getline(cin, input);
	stream.str(input);
	stream >> num13;
	stream.clear();

	if (num13 > num7)
	{
		cout << "Well done, the value is higher, the value is: " << num7 << endl;
	}
	else
	{
		cout << "Player 2 wins" << endl;
	}


	if (num13 < num7)
	{
		cout << "Player 1 wins" << endl;
	}

	return 0;
}

Here is the code for Exercise 2
#include<stdio.h>
#include<sstream>
#include<iostream>

using namespace std;

int main(int argc, char** argv)
{

	stringstream stream;
	string input = "";
	string player1;
	string player2;
	//the guessing process
	bool guess1 = true;
	bool guess2 = true;
	bool guess3 = true;
	int lives = 3;


	cout << "Player 1, please enter your name: " << endl;
	getline(cin, input);
	stream.str(input);
	stream >> player1;
	stream.clear();

	cout << "Player 2, please enter your name: " << endl;
	getline(cin, input);
	stream.str(input);
	stream >> player2;
	stream.clear();

	//if guess equals to true, player 2 wins, however if they don't, the x and y co-ordinates are marked off

	 //X Co-Ordinates

		cout << player1 << " Please enter the value for X" << endl;

		double x;
		getline(cin, input);
		stream.str(input);
		stream >> x;
		stream.clear();
		//please enter the co-ordinates for y
		cout << player1 << "Please enter the value for Y" << endl;

		double y;
		getline(cin, input);
		stream.str(input);
		stream >> y;
		stream.clear();

		cout << "X is equal to: " << x << endl;
		cout << "Y is equal to: " << y << endl;

		cout << player1 << " Please enter the value for X2" << endl;

		double x2;
		getline(cin, input);
		stream.str(input);
		stream >> x2;
		stream.clear();
		//please enter the co-ordinates for y
		cout << player1 << "Please enter the value for Y2" << endl;

		double y2;
		getline(cin, input);
		stream.str(input);
		stream >> y2;
		stream.clear();

		cout << "X2 is equal to: " << x2 << endl;
		cout << "Y2 is equal to: " << y2 << endl;

		cout << player1 << " Please enter the value for X3" << endl;

		double x3;
		getline(cin, input);
		stream.str(input);
		stream >> x3;
		stream.clear();
		//please enter the co-ordinates for y
		cout << player1 << "Please enter the value for Y3" << endl;

		double y3;
		getline(cin, input);
		stream.str(input);
		stream >> y3;
		stream.clear();

		cout << "X3 is equal to: " << x3 << endl;
		cout << "Y3 is equal to: " << y3 << endl;
	

		cout << player2 << " Now that the treasures have been placed" << endl;
		cout << "Please make three guesses as to where they are using the X and Y co-ordinates" << endl; 


		cout << player2 << " Please guess " << player1 << "'s treasure's positions" << endl;
		
		cout << player2 << " Please enter the value for X" << endl;

		double x4;
		getline(cin, input);
		stream.str(input);
		stream >> x4;
		stream.clear();
		//please enter the co-ordinates for y
		cout << player2 << " Please enter the value for Y" << endl;

		double y4;
		getline(cin, input);
		stream.str(input);
		stream >> y4;
		stream.clear();

		cout << "X is equal to: " << x4 << endl;
		cout << "Y is equal to: " << y4 << endl;

		if (x4 == x)
		{
			if (y4 == y)
			{
				cout << "Well done, you guessed correctly" << endl;
			}
			else
			{
				cout << "Unlucky " << player2 << ", That isn't right" << endl;
				//life system, user loses a life
				lives - 1; 
				cout << "You lose a life" << " Try and get this next one" << endl; 
			}
		}

		cout << player2 << " Please enter the value for X2" << endl;

		double x5;
		getline(cin, input);
		stream.str(input);
		stream >> x5;
		stream.clear();
		//please enter the co-ordinates for y
		cout << player2 << " Please enter the value for Y2" << endl;

		double y5;
		getline(cin, input);
		stream.str(input);
		stream >> y5;
		stream.clear();

		cout << "X is equal to: " << x5 << endl;
		cout << "Y is equal to: " << y5 << endl;

		if (x5 == x2)
		{
			if (y5 == y2)
			{
				cout << "Well done, you guessed correctly" << endl;
			}
			else
			{
				cout << "Unlucky " << player2 << ", That isn't right" << endl;
				//life system, user loses a life
				lives - 1;
				cout << "You lose a life" << " Try and get this next one" << endl;
			}
		}

		cout << player2 << " Please enter the value for X3" << endl;

		double x6;
		getline(cin, input);
		stream.str(input);
		stream >> x6;
		stream.clear();
		//please enter the co-ordinates for y
		cout << player2 << " Please enter the value for Y3" << endl;

		double y6;
		getline(cin, input);
		stream.str(input);
		stream >> y6;
		stream.clear();

		cout << "Y is equal to: " << x6 << endl;
		cout << "X is equal to: " << y6 << endl;

		if (x6 == x3)
		{
			if (y6 == y3)
			{
				cout << "Well done, you guessed correctly" << endl;
			}
			else
			{
				cout << "Unlucky " << player2 << ", That isn't right" << endl;
				//life system, user loses a life
				lives - 1;
				cout << "You lose a life," << " be careful" << endl;
			}

			if (lives == 0)
			{
				cout << "Unlucky " << player2 << "You lost" << endl; 
			}
		}

	return 0;

}
