int main(void){ int answer = 48; int low = 1, high = 100; int guess = 0; while(guess!=answer) { printf("請在%d到%d中猜一個數字:", low, high); scanf("%d", &guess); if(guess>answer) { guess = high; } else { guess = low; } }}假如我輸入的guess比answer大了話 我想將guess定義成High 反之則是low再麻煩大大解題了
添加回答
举报
0/150
提交
取消