标题:为什么我运行的程序不见前面的一小半??? 新手求教!
取消只看楼主
成成成
Rank: 1
等 级:新手上路
帖 子:26
专家分:0
注 册:2016-8-1
结帖率:66.67%
已结贴  问题点数:20 回复次数:1 
为什么我运行的程序不见前面的一小半??? 新手求教!
#include<stdio.h>
#define MAX 100
int main()
{
    int count=MAX+1;
    while(--count>0)
    {
        printf("%d bottles of spring water on the wall,"
            "%d bottlea of spring water!\n",count,count);
        printf("Take one down and pass it around,\n");
        printf("%d bottles of spring wawter !\n\n",count-1);
    }
    return 0;
}


为什么运行结果从这开始...

74 bottles of spring water on the wall, 74 bottlea of spring water!\n",count,count);
Take one down and pass it around,
73 bottles of spring wawter !
.
.
.
搜索更多相关主题的帖子: include spring return around count 
2016-10-02 14:52
成成成
Rank: 1
等 级:新手上路
帖 子:26
专家分:0
注 册:2016-8-1
得分:0 
回复 2楼 hc1650070770
谢谢!
改了下程序,最多能显示300行。。
#include<stdio.h>
#define MAX 1000
int main()
{
    int count=MAX+1;
    int a=1000;
    while(--count>0)
    {
        a--;
        printf("%d\n",a);
    }
    return 0;
}
2016-10-02 17:37



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




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

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