#include <iostream>
#include <cstdlib>

using namespace std;

int main()
{
    srand(time(0));
    int  seviye, rastgele_degisken, tahmin;
    int tahmin_hakki = 5;
    
    cout << "Seviyeyi seciniz : "<< endl;
    cout << "[1] Kolay (1 - 15)" << endl;
    cout << "[2] Orta (1 - 30)" << endl;
    cout << "[3] Zor (1 - 50)" << endl;
    
    cin >> seviye;
    
    if (seviye == 1)
    {
           rastgele_degisken=rand()%15+1;
    }
    else if (seviye == 2)
     {
          rastgele_degisken=rand()%30+1;
     }
    
    else
    {
        rastgele_degisken=rand()%50+1;
    }
    
    while (tahmin_hakki > 0)
    {
          tahmin_hakki --;
          cout<<"Tahmininizi yapin:";
          cin>>tahmin;
          if (tahmin<rastgele_degisken){
              cout<<"Tahmininiz gizli sayidan kucuk"<<endl;
          }else if(tahmin>rastgele_degisken){
              cout<<"Tahmininiz gizli sayidan buyuk"<<endl;
          }else{
              cout<<"Tebrikler dogru tahmin"<<endl;
              break;
          }
    }
        
    system("PAUSE");
    return 0;
}

