Ada
BEGIN DISPLAY("HELLO WORLD!") END.
Algol
BEGIN DISPLAY("HELLO WORLD!") END.
Assembly
global _main
extern _printf
section .text
_main:
push message
call _printf
add esp, 4
ret
message:
db 'Hello, world!', 10, 0
C
#include <stdio.h>
int main(void)
{
puts("Hello, world!");
}
C#
console.writeline("Hello, world!");
C++
#include <iostream>
int main()
{
std::cout << "Hello, world!";
return 0;
}
Cobol
IDENTIFICATION DIVISION.
PROGRAM-ID. hello-world.
PROCEDURE DIVISION.
DISPLAY "Hello, world!".
CoffeeScript
console.log 'Hello, world!'
Dart
main() {
print('Hello World!');
}
Delphi
program HelloWorld;
begin
WriteLn('Hello, world!');
end.
Fortran
program helloworld
print *, "Hello world!"
end program helloworld
Go
println("Hello, world!");
Haskell
module Main where
main :: IO ()
main = putStrLn "Hello, World!"
Java
public class HelloWorld {
public static void main(String[] args) {
System out println("Hello, World!");
}
}
JavaScript
console.log('hello, world!')
Kotlin
fun main(args: Array<String>) {
println("Hello World!")
}
Lisp
(print "Hello world")
Matlab
disp('Hello, world!')
Pascal
Writeln('Hello, world!');
Perl
print "Hello, world!\n";
Python
print('Hello, world!')
Scala
object HelloWorld extends App {
println("Hello, World!")
}
Swift
println("Hello, world!");
TypeScript
console.log('Hello, world!')