首页

2009年5月14日星期四

C实现递减


#include
#define MAX 100
int main(void)
{
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;
}

没有评论:

发表评论