关于VC++连接的问题

来源:百度知道 编辑:UC知道 时间:2024/05/05 23:58:19
我写了一个很简单的程序(初手啊)如下:
#include<stdio.h>
void main()
{
int x,y;
scanf("inpet the x :",&x);
if(x<1)
y=x;
else if(x>=1&&x<10)
y=2*x-1;
else
y=3*x-11;
printf("the y is:%d",y);
}

可是连接的时候就一直连接很久,关软件也不行。。卡掉了

#include<stdio.h>
void main()
{
int x,y;
scanf("inpet the x %d:",&x);// 你这行有问题
if(x<1)
y=x;
else if(x>=1&&x<10)
y=2*x-1;
else
y=3*x-11;
printf("the y is:%d",y);
}