程序第八行出现error C2065: 'x0' : undeclared identifier 执行 cl.exe 时出错,如何解决
#include <stdio.h>#include <math.h>
main()
{
long ge,shi,qian,wan,x;
scanf("%ld",&x);
wan=x/10000;
qian=x000/1000;
shi=x0/10;
ge=x;
if (ge==wan&&shi==qian)
printf("this number is a huiwen\n ");
else
printf("this number is not a huiwen\n");
}
这是在网上找到的程序,但无法输出,于是修改成了以下之后,能够输出,但结果不对:
#include <stdio.h>
#include <math.h>
main()
{
long ge,shi,qian,wan,x;
scanf("%ld",&x);
wan=x/10000;
qian=x/1000;
shi=x/10;
ge=x;
if (ge==wan&&shi==qian)
printf("this number is a huiwen\n ");
else
printf("this number is not a huiwen\n");
}
希望大家帮忙解决一下,谢谢!