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
#include <stdio.h> | |
int main(void) | |
{ | |
// example of a simple while loop | |
// code will continue to execute within the | |
// while loop brackets until countdown is equal to 0 | |
int countdown = 10; | |
while (countdown != 0) | |
{ | |
printf("%d!\n", countdown); | |
countdown--; // very important we decrement countdown | |
} | |
// once out of the while loop our program continues... | |
printf("happy new year!\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment