Skip to content

Instantly share code, notes, and snippets.

@nikosbosse
Created January 12, 2020 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikosbosse/4b848794f5e667ed839de90edb946ee9 to your computer and use it in GitHub Desktop.
Save nikosbosse/4b848794f5e667ed839de90edb946ee9 to your computer and use it in GitHub Desktop.
Intro to C-programming: While-Loops
#include <stdio.h>
int main(void){
int counter = 0;
int t = 1;
while (t){
counter++;
printf("counter: %d\n", counter);
if (counter == 5){
t = 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment