bottles.c

This commit is contained in:
wandoubaba517 2023-12-19 20:46:16 +08:00
parent e436681710
commit 399f8d1133

17
c05_expression/bottles.c Normal file
View 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;
}