#include <iostream>
using namespace std; // consider removing this line in serious projects
int main() {
cout<<"猜一个数字";
int intNum = 0;
int example=42;
cin >> intNum;
while (intNum != example) {
if (intNum > example){
cout<<intNum<<"猜大了"<<endl;
cin>>intNum;
}
if(intNum<example){
cout<<intNum<<"猜小了"<<endl;
cin>>intNum;
}
}
cout<<intNum<<"猜对了";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOyAvLyBjb25zaWRlciByZW1vdmluZyB0aGlzIGxpbmUgaW4gc2VyaW91cyBwcm9qZWN0cwoKaW50IG1haW4oKSB7Cgljb3V0PDwi54yc5LiA5Liq5pWw5a2XIjsKCWludCBpbnROdW0gPSAwOwoJaW50IGV4YW1wbGU9NDI7CgljaW4gPj4gaW50TnVtOwoJd2hpbGUgKGludE51bSAhPSBleGFtcGxlKSB7CgkJaWYgKGludE51bSA+IGV4YW1wbGUpewoJCQljb3V0PDxpbnROdW08PCLnjJzlpKfkuoYiPDxlbmRsOwoJCQljaW4+PmludE51bTsKCQl9CgkJaWYoaW50TnVtPGV4YW1wbGUpewoJCQljb3V0PDxpbnROdW08PCLnjJzlsI/kuoYiPDxlbmRsOwoJCQljaW4+PmludE51bTsKCQl9Cgl9CiAgICBjb3V0PDxpbnROdW08PCLnjJzlr7nkuoYiOwoJcmV0dXJuIDA7Cn0=