While Loop
int i = 0;
while (i < 5) {
printf("%d\n", i);
i++;
}
NOTE: Don't forget to increment the variable used in the condition, otherwise the loop will never end and become an "infinite loop"!
Comments
int i = 0;
while (i < 5) {
printf("%d\n", i);
i++;
}
NOTE: Don't forget to increment the variable used in the condition, otherwise the loop will never end and become an "infinite loop"!