Skip to content

Instantly share code, notes, and snippets.

@werdl
Last active April 22, 2023 16:33
Show Gist options
  • Save werdl/ffa817ef7d6b2c6eb5c01b486b4ce218 to your computer and use it in GitHub Desktop.
Save werdl/ffa817ef7d6b2c6eb5c01b486b4ce218 to your computer and use it in GitHub Desktop.
99 bottles of beer full version- in 206 characters of C89
#define z(a)a==1?" bottle":" bottles"
x;char*b=" of beer";main(){x=100;while(x-->1){char*c=z(x);printf("%d%s%s %d%s%s, take one down pass it around,%d%s%s on the wall ",x,c,b,x,c,b,(x==1)?0:x-1,z(x-1),b);}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment