C语言Process exited with return value 3221225477

信号输入问题,编译没错但是无法运行。用Dev C++ 和VC都试过了

#include
void main()
{
int R=0,S=0,T=0;
scanf("%d",&T);
R=T/10;
S=T%10;
if(T<=59&&T>=11){
switch(R){
case 1:
printf("Unreadable");
break;
case 2:
printf("Barely readable, occasional words distinguishable");
break;
case 3:
printf("Readable with considerable difficulty");
break;
case 4:
printf("Readable with practically no difficulty");
break;
case 5:
printf("Perfectly readable");
break;
default:
break;
}
switch(S){
case 1:
printf("Faint signals, barely perceptible");
break;
case 2:
printf("Very weak signals");
break;
case 3:
printf("Weak signals");
break;
case 4:
printf("Fair signals");
break;
case 5:
printf("Fairly good signals");
break;
case 6:
printf("Good signals");
break;
case 7:
printf("Moderately strong signals");
break;
case 8:
printf("Strong signals");
break;
case 9:
printf("Extremely strong signals");
break;
default:
break;
}
}
return 0;
}

c

1个回答

用的是 void main()
之后又用了 return 0;

应改为 int main()

编译应该会报错,除此之外程序本身没有问题,可以正常输出结果。

如果对您有帮助,请点击采纳答案好吗,谢谢~~

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问