Skip to content

Instantly share code, notes, and snippets.

@chee
Forked from anonymous/my while loop
Created January 14, 2010 19:54
Show Gist options
  • Save chee/277441 to your computer and use it in GitHub Desktop.
Save chee/277441 to your computer and use it in GitHub Desktop.
#include <stdio.h>
/* just forking yr while loops */
main()
{
int age, legal;
age = 10;
// Britishising.
legal = 18;
while (age < legal){
printf("You cannot drink yet because you are only %i years old\n", age);
sleep(1);
age++;
}
printf("Now you can drink, because you're %i years old.\n\n", age);
sleep(1);
printf("Not that you weren't drinking already.\n\n"
sleep(2);
printf("\t\tYou waster.\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment