Logo

Programming-Idioms

History of Idiom 2 > diff from v60 to v61

Edit summary for version 61 by A:
New C implementation by user [A]

Version 60

2018-04-15, 01:48:57

Version 61

2018-08-12, 11:44:18

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
Code
for(int i=10;--i;printf("Hello\n"));
Comments bubble
Only available in C99 or later. Uses only 1 for loop