标题:如何让scanf接受两个字符型输入?
取消只看楼主
winglesswu
Rank: 1
等 级:新手上路
帖 子:92
专家分:0
注 册:2013-1-28
结帖率:71.88%
已结贴  问题点数:11 回复次数:0 
如何让scanf接受两个字符型输入?
我要让程序接受两个选择的输入,下面这样做对不对?
printf("\nDo you want the more comfortable seats and the upgraded custom gears? The charges are $50 and $300 respectively. Please enter your choice. yn4/yn5\n");
scanf(" %c%c", &yn4, &yn5);
但是老是出错运行不了。
搜索更多相关主题的帖子: custom choice 如何 
2013-03-01 01:44



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-399428-1-1.html




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

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