#include #include using namespace std; int main() { srand(time(NULL)); bool strzal[100]={false}; int qmin=1,qmax=100; int strzel; int pr=1; string pod; cout << "Program zgaduje jaka liczbe masz w pamiei,jezeli liczba jest za duza to napisz d a jak za mala m gdy program zgadnie napisz +" << endl; while(true) { again: strzel = rand()%(qmax-qmin+1)+qmin; if (strzal[strzel-1]==true) goto again; cout << strzel << endl; if (qmin==qmax) { cout << "Liczba o ktorej pomyslales to: " << qmin << endl; cout << "Udalo mi sie za " << pr << endl; break; } podaj: cout << "-"; cin >> pod; if (pod=="m") { qmin=strzel+1; } else if (pod=="d") { qmax=strzel-1; } else if (pod=="+") { cout << "Udalo mi sie za: "<