Programming-Idioms

History of Idiom 2 > diff from v44 to v45

Edit summary for version 45 :
[Cpp] Add newline character.

Version 44

2016-06-08, 12:39:23

Version 45

2016-06-25, 21:54:34

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

Imports
#include <iostream>
using namespace std;
Imports
#include <iostream>
using namespace std;
Code
for(int i=0;i<10;i++)
  cout << "Hello";
Code
for(int i=0;i<10;i++)
  cout << "Hello\n";