masz tu gotowe chyba dobrze ale nie wiem
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <conio.h>
using namespace std;
int main()
{
srand ((int) time(NULL));
int happy_number,check;
happy_number=rand()%100+1;
cout<<"Zgadnij jaka to liczba (0-100)?: ";
cin>>check;
while(check!=happy_number)
{
if(check<happy_number)
{
cout<<"Liczba jest za mala, sprobuj jeszcze raz: ";
cin >> check;
}
else
{
cout<<"Liczba jest za duza, sprobuj jeszcze raz: ";
cin >> check;
}
}
cout<< "GRATULACJE!!!, nacisnij dowolny przycisk zeby zakonczyc dzialanie programu";
getch();
return 0;
}