C++ int main(int argc, char *argv[]) { for(int i = 0; i < 10; i++) { cout << "Hi\n"; } } |
Java class Foo { public static void main(String args[]) { for(int i = 0; i < 10; i++) { System.out.println("Hi"); } } } |
Old
Basic 10 FOR $i = 1 to 10 20 print $i 30 NEXT $i |
Perl #!/usr/bin/perl for $i (0 .. 9) { print "Hi!\n"; } |
Python #!/usr/bin/python for x in range(0,9): print x |
Lisp (define (count x y) (if (> x 0) (cons y (count (- x 1) y)) ) ) (count 10 'hi) |
Prolog http://euclid.nmu.edu/~randy/Classes/CS322/Prolog/family_prolog |