| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 365 人关注过本帖
标题:C语言while语句问题
取消只看楼主 加入收藏
我是含羞草
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2015-5-18
结帖率:60%
收藏
已结贴  问题点数:10 回复次数:0 
C语言while语句问题
用700元购入物品的程序,执行后得到


Line up;
1:notebook \150
2:mechanical pencil \180
3:highlight marker set \210
4:eraser \110
Now You have \700 now. What do you want?
Input number of items:1
You've got a notebook.
Now You have \550 now. What do you want?
Input number of items:2
You've got a mechanical pencil.
Now You have \370 now. What do you want?
Input number of items:3
You've got highlight marker set.
Now You have \160 now. What do you want?
Input number of items:4
You've got a eraser.

Total items : 4
Remaining money : 50





Line up;
1:notebook \150
2:mechanical pencil \180
3:highlight marker set \210
4:eraser \110
Now You have \700 now. What do you want?
Input number of items:0
Error! Choose number 1-4 .
Now You have \700 now. What do you want?
Input number of items:1
You've got a notebook.
Now You have \550 now. What do you want?
Input number of items:1
You've got a notebook.
Now You have \400 now. What do you want?
Input number of items:1
You've got a notebook.
Now You have \250 now. What do you want?
Input number of items:1
You've got a notebook.

Total items : 4
Remaining money : 100.

[ 本帖最后由 我是含羞草 于 2015-5-21 16:27 编辑 ]
搜索更多相关主题的帖子: C语言 number notebook mechanical 
2015-05-21 16:26
快速回复:C语言while语句问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.058497 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved