Hello World!

各种我用过一段时间的 GPL 语言的 hello world 程序。

按时间排列

C

1
puts("hello world");

Java

1
System.out.println("hello world");

JavaScript

1
console.log("hello world");

C++

1
cout << "hello world" << endl;

ActionScript3.0

1
trace("hello world");

Python2

1
print "hello world"

Lua

1
print("hello world")

PHP

1
echo "hello world";

Haskell

1
putStrLn "hello world"

Clojure

1
(println "hello world")

Kotlin

1
println("hello world")

Rust

1
println!("hello world");

Swift

1
println("hello world")

Comments