#include <iostream>
#include <stdio. h>
#include <time. h>
#include <stdlib. h>
using namespace std;
//Compiler version g++ 6. 3. 0
using namespace std;
void StartGame()
{
cout << " Игра угадай число";
cout << " У меня есть число между 1 и 1000 Отгадайте и введите ваше число "
<< endl;
cout << " Угадайте и ведите число" ;
}
int RandElement(int *a)
{
*a = rand()%10+1;
return *a;
}
int InputElement(int *b)
{
cin >> *b;
return *b;
}
void WinLose(int &a , int &b)
{
for(int i=0;i<1;i++)
{
if( b==a)
{
cout << "Вы угадали число" << endl;
break;
}
if( b<a)
{
cout << "Вы не угадали. Даное число больше" << endl;
}
if( b>a)
{
cout << "Вы не угадали. Даное число меньше" << endl;
}
if(b!=a&&i==5)//Проверка
{
cout<<"К сожалению Вы так и не смогли угадать число. . . n";
}
}
cout << " Бот загадал число " << a;
}
int main()
{
srand(time(0));
int a,b;
//setlocale(LC_CTYPE, "rus");
StartGame();
RandElement(&a);
InputElement(&b);
WinLose(a,b);
}