在C语言中使用scanf()获取角色. [英] Getting Character using scanf() in C.
本文介绍了在C语言中使用scanf()获取角色.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
{
DWORD input;
int count;
char decision;
printf("Enter the DWORD");
scanf("%x",&input);
printf("\n Enter the counter");
scanf("%d",&count);
printf("\nFor Right-Shift (r) & For Left-Shift (l)\n");
//control not stop here......
scanf("%c",&decision);
if(decision == 'l')
input = input << count;
else
input = input >> count;
printf(" Output :: %x",input);
}
此处程序控制不会在scanf("%c",&decision);
处停止
它采用enter的价值.
Here program control does not stop at scanf("%c",&decision);
It takes value of enter.
推荐答案
不要在多个论坛中发布相同的问题!您已经警告发布了此问题,并在此处 [ ^ ]
Don''t post the same question in multiple forums! You have alredy posted this question and received an answer here[^]
这篇关于在C语言中使用scanf()获取角色.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文