考虑到主函数中调用了guess()和guess(int)两个函数。故将guess重载。int guess(){return 50;}int guess(int ans){static int min=0,max=100;if(ans==1)max=(max+min)/2;elsemin=(max+min)/2;return (max+min)/2;}