循环结构问题
#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 bottles of spring water!\n",count ,count);
printf("Take one down and pass it around.\n");
printf("%d bottles of spring water!\n\n",count-1);
}
return 0;
}请大家看一看为什么预处理器定义的最大值是100,运行起来置顶的却只有74?
应为不能完整显示啊这个黑窗口能显示的数据是有限的啊 (*^__^*) 嘻嘻…… #include<stdio.h>
void main()
{
int i;
for(i = 1;i<1000;++i)
{
printf("%d\n",i);
}
}这个很简单吧就是把1--1000输出 但你运行看看比700小的数有没有
就是这个道理 只能显示这么多
申请最佳啊 (*^__^*) 嘻嘻…… :sweat:来学东西的。。。。。 牡丹花下死做鬼 发表于 2013-8-11 21:49 static/image/common/back.gif
这个很简单吧就是把1--1000输出 但你运行看看比700小的数有没有
就是这个道理 只能显示这么多
申请最佳啊 ...
OK,了解了
页:
[1]