Snippets by wikibooks.org - List of hello world programs
<asp:Label ID="Label1" runat="server" Text="Hello World"></asp:Label>
#include <stdio.h>
int main(int argc, char* argv[])
{
printf("Hello, world!\n");
return 0;
}
#include <iostream>
using namespace std;
int main()
{
cout << "Hello, world!" << endl;
return 0;
}
class HelloWorldApp
{
static void Main()
{
System.Console.WriteLine("Hello, world!");
}
}
<cfoutput>Hello, world!</cfoutput>
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.
<?php
echo "Hello, world!";
?>
WScript.Echo "Hello, world!"
001 <?xml version="1.0" encoding="utf-8"?>
002 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
003 <html xmlns="http://www.w3.org/1999/xhtml">
004 <head>
005 <title>Hello, world!</title>
006 </head>
007 <body>
008 <p>Hello, world!</p>
009 </body>
010 </html>
.method public static void Main() cil managed
{
.entrypoint
.maxstack 1
ldstr "Hello, world!"
call void [mscorlib]System.Console::WriteLine(string)
ret
}