Hello World from 10 Different Languages"Hello World" programs are known to programmers from all around the world. No matter what language you are trying to learn, it is about 99.999% guaranteed that your first test program will be of the "Hello World" type. And so, this page is my ode to "Hello World" applications. |
|
|
C C++ C# Caml HTML Java JavaScript Perl Unix VBScript |
C#include <stdio.h>main() { printf ("Hello World!\n"); } C++// Hello World in C++ #includemain() { cout << "Hello World!" << endl; return 0; } C#// Hello World in Microsoft C# ("C-Sharp").using System; class HelloWorld { public static int Main(String[] args) { Console.WriteLine("Hello, World!"); return 0; } } Caml(* Hello World in CAML *)let hello = print_string "Hello World!"; hello;; HTML<html><!-- Hello World in HTML --> <head> <title>Hello World!</title> </head> <body> Hello World! </body> </html> Java// Hello World in Javaclass HelloWorld { static public void main( String args[] ) { System.out.println( "Hello World!" ); } } JavaScript<html><body> <script language="JavaScript" type="text/javascript"> // Hello World in JavaScript document.write('Hello World'); </script> </body> </html> Perl# Hello world in perlprint "Hello World!\n"; Unix#!/bin/sh# Hello World for the Unix shell echo "Hello World!" VBScript<%@ language="vbscript" %><html><body> <% Response.write "Hello World!" %> </body></html> |
| Created by John Trupiano | |