main( ) {
extrn a, b, c;
putchar(a); putchar(b); putchar(c); putchar('!*n');
}
a 'hell';
b 'o, w';
c 'orld';
Mai jos este programul hello world scris în câteva limbaje:BASIC
10 REM Hello World in BASICC
20 PRINT "Hello World!"
#include
int main()
{
printf("hello, world");
return 0;
}
C ++
#includeC#
main()
{
cout << "Hello World!" <<>
using System;
class HelloWorld
{
public static int Main(String[] args)
{
Console.WriteLine("Hello, World!");
return 0;
}
}
COBOL
* Hello World in COBOLdBASE
*****************************
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
MAIN SECTION.
DISPLAY "Hello World!"
STOP RUN.
****************************
* Hello World in dBase IVDELPHI
? "Hello World!"
Program Hello_World;FORTRAN
{$APPTYPE CONSOLE}
Begin
WriteLn('Hello World');
End.
C Hello World in FortranJAVA
PROGRAM HELLO
WRITE (*,100)
STOP
100 FORMAT (' Hello World! ' /)
END
class HelloWorld {PASCAL
static public void main( String args[] ) {
System.out.println( "Hello World!" );
}
}
program HelloWorld(output);PHP
begin
WriteLn('Hello World!');
end.
PL-SQL
set serveroutput onŞi lista poate continua. Mai multe exemple puteţi găsi aici: http://www.roesler-ac.de/wolfram/hello.htm
begin
dbms_output.enable(10000);
dbms_output.put_line('Hello World');
end;
0 comentarii:
Trimiteți un comentariu