Created
April 10, 2017 00:38
-
-
Save ntcho/12df7b1ac6bf0a5130cb28850adf44d8 to your computer and use it in GitHub Desktop.
C++ Loops
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
int main() { | |
int i = 0, j = 0, k = 0; | |
// for statement | |
for (i = 0; i < 5; i++) { | |
print(i); | |
} | |
// while statement | |
while (j < 5) { | |
print(j++); | |
} | |
// do while statement | |
do { | |
print(k++); | |
} while (k < 5); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment