标题:我的程序写好运行出来是空的呢?
取消只看楼主
pchszwzc11
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2012-9-22
结帖率:0
 问题点数:0 回复次数:3 
我的程序写好运行出来是空的呢?

#include "stdafx.h"
#include "math.h"

int main(int argc, char* argv[])
{
    int y,z,x;
    scanf("%d%d",&y,&z);
    for(x=0;x<100000;x++);
    if(pow(y,2)==100+x&&pow(z,2)==268+x)
    {   
        printf("%d%d",y,z);
    }
    return 0;
   
}

请教下是我哪里错了,还是什么原因呢?
搜索更多相关主题的帖子: include 
2012-09-23 09:56
pchszwzc11
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2012-9-22
得分:0 
#include "stdafx.h"
#include "math.h"

int main(int argc, char* argv[])
{
    int y,z;
    int x;
    scanf("%d%d",&y,&z);
    for(x=0;x<100000;x++);
    if(pow(y,y)==100+x&&pow(z,z)==268+x)
    {   
        printf("%d%d",y,z);
    }
    return 0;
   
}

2012-09-23 10:16
pchszwzc11
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2012-9-22
得分:0 
该如何改正呢?想半天想不出来如何改动。
2012-09-23 11:27
pchszwzc11
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2012-9-22
得分:0 
回复 9楼 gxkgsch
嗯我想了下 应该 long int
2012-10-12 00:58



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




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

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