DEV編譯正確運行不正確
發布時間: 2025-10-09 21:56:33
㈠ win10系統用Dev c++寫C語言時,編譯通過,運行時卻顯示exe文件運行錯誤。
代碼有問題,能通過編譯,但運行就會有問題。。
問題出現在scanf("%d",x);少了取地址符&
請改成scanf("%d",&x);
#include<stdio.h>
intmain()
{
intx=0;
scanf("%d",&x);
inta=x/100;
intc=x%10;
intb=x/10%10;
printf("%d ",a+b*10+c*100);
return0;
}
請採納。。。謝謝
熱點內容