Logo

Programming-Idioms

  • Go
  • C
#include <stdio.h>
for (int i = 0; i < 10; i++) {
    printf("Hello\n");
}

Note the necessary newline (\n), not to print every time on the same line
import "fmt"
import "strings"
fmt.Println(strings.Repeat("Hello\n", 10))
import "fmt"
for i := 0; i < 10; i++ {
	fmt.Println("Hello")
}
import "fmt"
for range 10 {
	fmt.Println("Hello")
}
with Ada.Text_IO;
use Ada.Text_IO;
for I in 1 .. 10 loop
  Put_Line ("Hello");
end loop;

New implementation...
< >
programming-idioms.org