求助!!
#include<stdio.h>int main()
{
int iNumber;
printf("************************\n");
printf("* 可选择的按键: *\n");
printf("* 1.巧克力 *\n");
printf("* 2.小面包 *\n");
printf("* 3.可口可乐 *\n");
printf("************************\n");
printf("从1~3中选择按键:\n");
scanf("%d", &iNmuber);
switch(iNumber)
{
case 1:
printf("您选择了巧克力\n");
break;
case 2:
printf("您选择了小面包\n");
break;
case 3:
printf("您选择了可口可乐\n");
break;
default:
printf("输出错误!\n");
break;
}
return 0;
}
最后显示” 'iNmuber' was not declared in this scope“ 这是为什么呢? 拼写错误,仔细检查一下 你上面定义了int iNumber;下面用的却是scanf("%d", &iNmuber) scanf("%d", &iNmuber);
页:
[1]