#include using namespace std; int main() { int high = 100; int low = 0; string str = ""; for (int i =0; i < 7; ++i) { cout << "Czy liczba jest > " << low + (high -low) /2 << endl; cin >> str; if (str == "t") { low += (high - low)/2; if (high-low <=1) cout << "Twoja liczba, to: " << high << endl; cout << "high == " << high << endl; cout << "low == " << low << endl; } else if (str == "n") { high -= (high - low)/2; if (high-low <=1) cout << "Twoja liczba, to: " << high << endl; cout << "high == " << high << endl; cout << "low == " << low << endl; } } }