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 practicing my while loops */
main()
{
int age, legal;
age = 10;
legal = 21;
while (age != 21){
printf("%s %d %s", "you can not drink yet because you are", age, "years old\
\n");
age = age + 1;
}
printf("%s %d %s", "you can legally drink now because you are" ,age, "years o\
ld\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment