Snippets by wikibooks.org - List of hello world programs
#include int main(int argc, char* argv[]) { printf("Hello, world!\n"); return 0; }
#include using namespace std; int main() { cout << "Hello, world!" << endl; return 0; }
class HelloWorldApp { static void Main() { System.Console.WriteLine("Hello, world!"); } }
IDENTIFICATION DIVISION. PROGRAM ID. HELLO-WORLD. PROCEDURE DIVISION. DISPLAY "Hello, world!" STOP RUN.
class HELLO_WORLD create make feature make is do io.put_string("Hello, world!%N") end -- make end -- class HELLO_WORLD
PROGRAM HELLO PRINT *, 'Hello, world!' END
main = putStrLn "Hello, world!"
public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, world!"); } }
document.writeln('Hello, world!');
program hello; begin writeln('Hello, world!'); end.
WScript.Echo "Hello, world!"
001 Hello, world!
002<p>Hello, world!</p>
003
.method public static void Main() cil managed { .entrypoint .maxstack 1 ldstr "Hello, world!" call void [mscorlib]System.Console::WriteLine(string) ret }