A collection of Hello World applications from helloworld.org.
C
1 2 3 4 5 6 7
| #include <stdio.h> int main(void) { printf("Hello World\n"); return 0; }
|
C++
1 2 3 4 5 6 7
| #include <iostream.h> int main(void) { cout << "Hello World" << endl; return 0; }
|
JAVA
1 2 3 4 5 6 7
| class helloWorld { public static void main(String args[]) { System.out.println("Hello World"); } }
|
Assembler
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| #include <stdio.h> char format[] = "%s %s\n" char hello[] = "Hello" char world[] = "world" void main( void ) { __asm { mov eax, offset world push eax mov eax, offset hello push eax mov eax, offset format push eax call printf pop ebx pop ebx pop ebx } }
|
.Net
1 2 3 4 5 6 7 8 9 10
| // Hello World .NET #using <mscorlib.dll> using namespace System; int _tmain() { Console::WriteLine(S"Hello World"); return 0; }
|
Erlang
1 2 3 4
| -module(hello). -export([world/0]). world() -> io:format("Hello World").
|
Ruby
BASIC
1 2 3
| // Texas Instruments TI-81 BASIC Prgm1:HELLO... :Disp "HELLO WORLD"
|
Perl
Python
Bash
1 2
| #!/bin/bash echo "Hello World"
|
Brainfuck
1 2 3
| >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-] >++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++ .------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.
|
php
Pascal
1 2 3 4 5
| Program HelloWorld; Begin Writeln ('Hello World!'); End.
|
Delphi
1 2 3 4 5 6 7 8 9
| program Project1; uses qdialogs; const s='Hello, World!'; begin showmessage(s); end.
|