用c语言编程 猜价格系统 从中间的数开始猜 之后再折中 大神帮帮忙
答案:1 悬赏:30 手机版
解决时间 2021-04-06 23:29
- 提问者网友:戎马万世
- 2021-04-06 05:50
用c语言编程 猜价格系统 从中间的数开始猜 之后再折中 大神帮帮忙
最佳答案
- 五星知识达人网友:神的生死簿
- 2021-04-06 07:08
#include
int main(){
int i,t,price=100,times=5;
for(i=0;i printf("how much:");
scanf("%d",&t);
if(t==price){
printf("Right!So good are you!
");
break;
}else if(t printf("too small..
");
else
printf("too big^
");
}
if(i==times)printf("time out!Wish you lucky next time.
");
return 0;
}
int main(){
int i,t,price=100,times=5;
for(i=0;i
scanf("%d",&t);
if(t==price){
printf("Right!So good are you!
");
break;
}else if(t
");
else
printf("too big^
");
}
if(i==times)printf("time out!Wish you lucky next time.
");
return 0;
}
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯