Logo

Programming-Idioms

History of Idiom 2 > diff from v112 to v113

Edit summary for version 113 by RunSoFun:
[C] i added libraries

Version 112

2020-04-29, 09:04:42

Version 113

2020-05-18, 07:21:51

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Illustration

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Illustration
Imports
Imports
#include <stdio.h>
Code
for (int i = 0; i < 10; i++) {
    printf("Hello\n");
}
Code
for (int i = 0; i < 10; i++) {
    printf("Hello\n");
}
Comments bubble
Note the necessary newline (\n), not to print every time on the same line
Comments bubble
Note the necessary newline (\n), not to print every time on the same line