标题:程序第八行出现error C2065: 'x0' : undeclared identifier 执行 cl.exe 时 ...
取消只看楼主
麦浪123
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2015-9-21
结帖率:100%
已结贴  问题点数:20 回复次数:1 
程序第八行出现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");
}
希望大家帮忙解决一下,谢谢!
搜索更多相关主题的帖子: include number 如何 
2015-10-02 23:35
麦浪123
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2015-9-21
得分:0 
回复 3楼 蓝色风暴cl
差不多,但你编译的可读性更强,谢谢!
2015-10-03 01:14



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-457890-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.206790 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved