GBasic
print("Hello, world!")
易语言
信息框 ("Hello, World!", 0, , )
VB
ModuleMainFrm
SubMain()
System.Console.WriteLine("Hello, World!")
EndSub
EndModule
C
#include
intmain()
{
printf("Hello, World!");
return0;
}
Swift
print("Hello, World!")
Go
package main
func main() {
println("Hello, World!")
}
BATCH
@echooff
echoHello, World!
pause
Java
publicclassHelloWorld
{
publicstaticvoidmain(String[] args)
{
System.out.println( "Hello, World!");
}
}
C++
#include
usingnamespacestd;
intmain()
{
cout<<"Hello, World!"<
return0;
}
C#
namespaceHelloWorld
{
classProgram
{
staticvoidMain(string[] args)
{
System.Console.Write("Hello, World!");
}
}
}
PHP
echo "Hello, World!";
JavaScript
console.log("Hello, World!")
Python 2
print"Hello, World!"
Python 3
1print("Hello, World!")
LaTeX
\documentclass{article}
\begin{document}
Hello, World!
\end{document}
Mathematica
方法一:基于Wolfram 底层语言(进入表达式界面使用) [2]
Cell["Hello, World!"]
方法二:直接使用数学输出函数
CellPrint[Cell["Hello, World!"]]
Ruby
defhello()
return"Hello , World"
end
Kotlin
fun main(args: Array) {
println("Hello, world!")
}