#include <iostream>
using namespace std;
int main( )
{
string player1;
string player2;
int anumber;
int bnumber;
int x;
int y;
cout << "Player 1 Enter Your Name" << endl;
cin >> player1;
cout << "Player 2 Enter Your Name" << endl;
cin >> player2;
cout << player1 << ", Enter Your Number" << endl;
cin >> anumber;
cout << player2 << ", Enter Your Number" << endl;
cin >> bnumber;
while ( true ) {
cout << player1 << ", Try to Guess " << player2 << "'s number" << endl;
cin >> x;
if ( x== bnumber) {
cout << "You Win!" << endl;
break ;
}
else if ( x> bnumber) {
cout << "Too High" << endl;
}
else if ( x< bnumber) {
cout << "Too Low" << endl;
}
cout << player2 << ", Try to Guess " << player1 << "'s number" << endl;
cin >> y;
if ( y== anumber) {
cout << "You Win!" << endl;
break ;
}
else if ( y> anumber) {
cout << "Too High" << endl;
}
else if ( y< anumber) {
cout << "Too Low" << endl;
}
}
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkKewogICAgc3RyaW5nIHBsYXllcjE7CglzdHJpbmcgcGxheWVyMjsKCWludCBhbnVtYmVyOwoJaW50IGJudW1iZXI7CglpbnQgeDsKCWludCB5OwoJY291dCA8PCAiUGxheWVyIDEgRW50ZXIgWW91ciBOYW1lIiA8PCBlbmRsOwoJY2luID4+IHBsYXllcjE7Cgljb3V0IDw8ICJQbGF5ZXIgMiBFbnRlciBZb3VyIE5hbWUiIDw8IGVuZGw7CgljaW4gPj4gcGxheWVyMjsKCWNvdXQgPDwgcGxheWVyMSA8PCAiLCBFbnRlciBZb3VyIE51bWJlciIgPDwgZW5kbDsKCWNpbiA+PiBhbnVtYmVyOwoJY291dCA8PCBwbGF5ZXIyIDw8ICIsIEVudGVyIFlvdXIgTnVtYmVyIiA8PCBlbmRsOwoJY2luID4+IGJudW1iZXI7Cgl3aGlsZSh0cnVlKSB7CgkJY291dCA8PCBwbGF5ZXIxIDw8ICIsIFRyeSB0byBHdWVzcyAiIDw8IHBsYXllc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