【发布时间】:2014-03-13 06:50:33
【问题描述】:
我试图弄清楚使用什么语句让用户输入 1 到 10 之间的数字。
这是我目前所拥有的。
int a;
printf("Enter a number between 1 and 10: \n);
scanf("%d", &a);
【问题讨论】:
-
您无意中用标签回答了自己的问题 - 使用“while-loop”。
-
而这个问题是......?
标签: c loops if-statement while-loop