| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1660 人关注过本帖
标题:程序第八行出现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
快速回复:程序第八行出现error C2065: 'x0' : undeclared identifier 执行 cl.e ...
数据加载中...
 
   



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

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