Created
January 10, 2012 07:25
-
-
Save HelixSpiral/1587646 to your computer and use it in GitHub Desktop.
99 Bottles of beer on the wall
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://rosettacode.org/wiki/99_Bottles_of_Beer */ | |
#include <stdio.h> | |
int main() | |
{ | |
int bottles; | |
for(bottles = 99; bottles > 0; --bottles) | |
{ | |
printf("%d bottles of beer on the wall\r\n", bottles); | |
printf("%d bottles of beer\r\n", bottles); | |
printf("Take one down, pass it around\r\n"); | |
printf("%d bottles of beer on the wall\r\n", bottles-1); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment