Created
March 20, 2017 16:44
-
-
Save AndyNovo/83d30fb756e54edac1526eaf5db3f03f to your computer and use it in GitHub Desktop.
Basic C loop
This file contains hidden or 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() { | |
int i; | |
//The first part of this for loop is run once as an initialization | |
//the second part is checked for truth at the end of each execution to determine if the loop should be run again | |
//the third part is executed at the end of the loop (typically used to increment something) | |
for (i = 0; i < 5; i++){ | |
printf("i = %d\n", i); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment