Jump to content

User:Siebengang/Workbench/Hello, world!

From Wikibooks, open books for an open world

Python

[edit | edit source]
# Hello b805eko in Python
print "Hello, b805eko!"
# Hello World in Perl
print "Hello World!";
<?php
    // Hello World in PHP
    echo 'Hello, world!';
?>
/* Hello World in Ansi-C */
#include <stdio.h>
int main()
{
    printf("Hello, World!\n");
    return 0;
}
// Hello World in C++
#include <iostream>
int main()
{
    std::cout << "Hello, World!" << std::endl;
    return 0;
}
// Hello World in Microsoft C#
using System;
class HelloWorld
{
    public static int Main(String[] args)
    {
        Console.WriteLine("Hello, World!");
        return 0;
    }
}

Fortran 77

[edit | edit source]
C     Hello World in Fortran 77
      PROGRAM HELLO
      PRINT*, 'Hello World!'
      END
// Hello World in Java
class HelloWorld
{  
    public static void main(String args[])
    {
        System.out.println("Hello World!");
    }
}

Pascal

[edit | edit source]
{Hello World in Pascal}
program HelloWorld(output);
begin
  WriteLn('Hello World!');
end.

Basic

[edit | edit source]
10 REM Hello World in BASIC
20 PRINT "Hello World!"