Idiom #2 Print Hello 10 times

Loop to execute some code a constant number of times

`(0 until 10).foreach( _ => println("Hello"))`
```with Ada.Text_IO;
```for I in 1 .. 10 loop
Put_Line ("Hello");
end loop;```
```for (int i = 0; i < 10; i++) {
printf("Hello\n");
}```
```let rec n_hello_worlds
(n : int)
: unit =
if n = 0 then
()
else
(print_endline "Hello World!";
n_hello_worlds (n-1))

n_hello_worlds 10```
```(dotimes [_ 10]
(println "Hello"))```
```IDENTIFICATION DIVISION.
PROGRAM-ID. hello 10 times.
PROCEDURE DIVISION.
PERFORM 10 TIMES
DISPLAY "Hello"
END-PERFORM
STOP RUN.```
```#include <iostream>
using namespace std;```
```for (int i = 0; i < 10; ++i)
cout << "Hello\n";```
```for (int i = 0; i < 10; i++)
{
System.Console.WriteLine("Hello");
}
```
`import std.stdio;`
```foreach(i; 0..10)
writeln("Hello");```
```import std.stdio : writeln;
import std.range : iota;
import std.algorithm.iteration : each;```
`iota(0,10).each!(a => "Hello".writeln);`
```for (var i = 0; i < 10; i++) {
print("Hello");
} ```
`1..10 |> Enum.each(fn _ -> IO.puts "Hello" end)`
```lists:foreach(
fun(_) ->
io:format("Hello~n")
end, lists:seq(1, 10)).```
```program main
implicit none
integer :: i
do i=1,10
write (*,'(A)') "Hello"
end do
end program main
```
`import "fmt"`
```for i := 0; i < 10; i++ {
fmt.Println("Hello")
}
```
`replicateM_ 10 \$ putStrLn "Hello"`
```for (let i = 0; i < 10; i++) {
console.log("Hello");
}```
```let count = 0;
while (count < 10) {
count++;
console.log('Hello');
};```
```for(int i=0;i<10;i++)
System.out.println("Hello");```
```(0..9).forEach {
println("Hello")
}
```
```repeat(10) {
println("Hello")
}```
```(loop repeat 10 do (write-line "Hello"))
```
```for i=1, 10 do
print('Hello')
end```
```for (NSInteger i=0;i<10;i++){
NSLog(@"Hello world");
}```
```for (\$i = 0; \$i < 10; \$i++) {
echo 'Hello' . PHP_EOL;
}```
```foreach(range(1, 10) as \$i)
echo 'Hello'. PHP_EOL;
```
```<?php
for(\$i=1;\$i<=10;\$i++){
print 'Hello';
}

?>```
```var
i: integer;
begin
for i:=1 to 10 do
WriteLn('Hello');
end;```
`print "Hello\n" for 1 .. 10;`
`print "Hello\n" x 10;`
`say "Hello" for 1 .. 10;`
```for i in range(10):
print("Hello")```
`print("Hello\n"*10)`
`print("Hello\n"*10)`
`10.times { p 'Hello' }`
```10.times do
puts "Hello"
end```
`puts "Hello\n" * 10`
`for _ in 0..10 { println!("Hello"); }`
```(define (hellos i)
(if (> i 0)
(begin
(display "Hello")
(newline)
(hellos (- i 1)))))
(hellos 10)```
`system.io`
```for x = 1 to 10
console.writeline("Hello")
next x```

Idiom created by

programming-idioms.org