Program Hello, world!

Hello, world! este un program de calculator foarte simplu care doar afișează pe dispozitivul de ieșire (de obicei, ecran) textul englez Hello, world!. Este folosit pentru a testa funcționarea compilatorului sau pentru a ilustra începătorilor limbajul de programare ales.

ABAPModificare

Report ZHello.
write 'Hello, World!'.

AdaModificare

with Ada.Text_IO;
 
procedure Hello_World is
 use Ada.Text_IO;
begin
    Put_Line("Hello, world!");
end;

ALGOLModificare

BEGIN
   DISPLAY ("Hello, world!");
END.

AppleScriptModificare

display dialog "Hello, world!"

AutoItModificare

#include <MsgBoxConstants.au3>
 
Msgbox($MB_ICONINFORMATION, "", "Hello, world!")

AWKModificare

BEGIN { print "Hello, world!" }

BASICModificare

PRINT "Hello, world!"

BatchModificare

echo off
echo Hello, World!

Boo (limbaj de programare)Modificare

print "Hello, world!"

BrainfuckModificare

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.

CModificare

#include <stdio.h>
 
int main(void)
{
    printf("Hello, World!\n");
    return 0;
}

C++Modificare

#include <iostream>
int main()
{
    std::cout << "Hello, world!" << std::endl;
    return 0;
}

sau

#include <iostream>
using namespace std;
int main()
{
    cout << "Hello, world!" << endl; // endl sau "\n";
    return 0;
}

C#Modificare

class HelloWorldApp
{
    static void Main()
    {
        System.Console.WriteLine("Hello, world!");
    } 
}

CleanModificare

module hello
 Start :: {#Char}
 Start = "Hello, world!"

CoffeeScriptModificare

alert('Hello, world!')

DModificare

import std.stdio;
 
void main()
{
  writeln("Hello, world!");
}

EModificare

println("Hello, world!")

FortranModificare

program hello
    write(*,*) 'Hello, world!'
end program hello

HaskellModificare

module Main (main) where
 
main = putStrLn "Hello, world!"

JModificare

'Hello, world!'

JavaModificare

public class HelloWorld
{
    public static void main(String arg[])
    {
         System.out.println("Hello, World!");
    }
}

JavaScriptModificare

document.write('Hello, world!');

sau ca un mesaj de alertă:

alert('Hello, world!');

LispModificare

Common LispModificare

(print "Hello world!")

SchemeModificare

(let ((hello0 (lambda() (display "Hello world") (newline))))
  (hello0))

LOLCODEModificare

HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE

LuaModificare

print("Hello, world!")

MATLABModificare

disp('Hello, world!')

OberonModificare

MODULE Hello;
   IMPORT Out;
BEGIN
   Out.String("Hello, world!");
   Out.Ln
END Hello.

Objective-CModificare

#import <stdio.h>
#import <Foundation/Foundation.h>
 
int main(void)
{
    NSLog(@"Hello, world!\n");
    return 0;
}

OpenEdge Advanced Business LanguageModificare

 DISPLAY "Hello World!".

OzModificare

{Show 'Hello, world!}

PascalModificare

program hello;
begin
    writeln('Hello, world!');
    readln;
end.

PerlModificare

print "Hello, world!\n";

PietModificare

 

PHPModificare

<? echo "Hello, World!\n";?>

sau, mai simplu:

<?="Hello, World!\n"?>

PrologModificare

main :- write('Hello, world!'), nl.

PythonModificare

print ( "Hello, world!" )

sau

  import sys
  sys.stdout.write("Hello, world!\n")

RModificare

cat('Hello, world!\n')

REXXModificare

say Hello, world!

RubyModificare

print "Hello, world!"

SchemeModificare

(let ((hello0 (lambda() (display "Hello world") (newline))))
  (hello0))

Seed7Modificare

$ include "seed7_05.s7i";

const proc: main is func
  begin
    writeln("Hello, world!");
  end func;

SmalltalkModificare

Transcript show: 'Hello, world!'.

SQLModificare

SELECT 'Hello, world!' FROM DUMMY;
SELECT 'Hello, world!' FROM DUAL;
SELECT 'Hello, world!';

Tcl/TKModificare

puts "Hello, world!"

TuringModificare

put "Hello, world!"

Visual BasicModificare

Sub Main()
  Print "Hello, world!"
End Sub

WhitespaceModificare