C语言中scanf被禁用,【scanf()被屏蔽了】,高手快来看看吧

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

scanf被屏蔽了,什么原因?

悬赏分:10 - 离问题结束还有 14 天 12 小时

#include 

int main()

{

int a,b,x,i=0;

char c,c1;

printf("/----------------------------/\n/¡ª /\n/----------------------------/\n");

printf("/ 1 2 3 + - /\n");

printf("/ 4 5 6 * / /\n");

printf("/ 7 8 9 = /\n");

printf("/ 0 end /\n");

printf("/----------------------------/\n\n");

printf("now you can use it, please input a question!\n");

while(i<2)

{

printf("Please choose + - * /\n");

getch();

printf("\n");

scanf("%c",&c);

switch©

{

case '+':

printf("please input a,b!\n");

scanf("%d,%d",&a,&b);

x=a+b;

printf("%d+%d=%d",a,b,x);

goto loop;

case '-':

printf("please input a,b!\n");

scanf("%d,%d",&a,&b);

x=a-b;

printf("%d-%d=%d",a,b,x);

goto loop;

case '*':

printf("please input a,b!\n");

scanf("%d,%d",&a,&b);

x=a*b;

printf("%d*%d=%d",a,b,x);

goto loop;

case '/':

printf("please input a,b!\n");

scanf("%d,%d",&a,&b);

x=a/b;

printf("%d/%d=%d",a,b,x);

goto loop;

default:

printf("input error!请重新输入!\n");

i++;

}

if(i==1)

{

printf("本次结束\n");

}

}

loop:;

if(i==2)

{

printf("input error!!\n");

}

getch();

}

调试环境vc++6.0,在第二次循环中系统没有提示输入scanf(),请问这是什么原因?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值