Skip to content

Instantly share code, notes, and snippets.

@HelixSpiral
Created January 10, 2012 07:25
Show Gist options
  • Save HelixSpiral/1587646 to your computer and use it in GitHub Desktop.
Save HelixSpiral/1587646 to your computer and use it in GitHub Desktop.
99 Bottles of beer on the wall
/* 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