bottles.c
This commit is contained in:
parent
e436681710
commit
399f8d1133
17
c05_expression/bottles.c
Normal file
17
c05_expression/bottles.c
Normal file
@ -0,0 +1,17 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#define MAX 10
|
||||
|
||||
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 on down and pass it around,\n");
|
||||
printf("%d bottles of spring water!\n\n", count - 1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user