主页 分类 关于

33种编程语言的HelloWorld

我的核心代码

C语言

printf("Hello, World!");

C++

cout<<"Hello, World!";

PHP

echo "Hello, World!";

Python

print("Hello, World!")

HTML

<html>
<head>
<title> Hello World! </title>
</head>
<body>
Hello, World!
</body>
</html>

易语言

信息框 ("Hello, World!", , 64) 

Jscript

document.write("Hello, World!")

java

System.out.println("Hello, World!");

SQL

CREATE TABLE MESSAGE (TEXT CHAR(13));
INSERT INTO MESSAGE (TEXT) VALUES ('Hello, World!');
SELECT TEXT FROM MESSAGE;
DROP TABLE MESSAGE;

TypeScript

function sayHello(person: string) {
return 'Hello, ' + person;
}

let user = 'Xcat Liu';
console.log(sayHello(user));

VBScript

MsgBox "Hello, World!"

VB

Print "Hello, World!"

VC

MessageBox("Hello, World!");

shell

echo Hello, World!

perl

print 'Hello, World!'

powerBuilder

messagebox ("Hello, World!")

C#

System.Console.WriteLine("Hello, World!")

COBOL

DISPLAY 'Hello, World!'

AS

Alert.show("Hello, World!");

Malbolge

('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#"
`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>

DOS 批处理

echo Hello, World!

OC

NSLog(@"Hello, World!")

QBasic

Print "Hello, World!"

Asp

Response.Write "Hello, World!"

ActionScript

trace("Hello, World!");

ASP

<% Response.Write("Hello, World!") %>

Delphi

ShowMessage('Hello, World!');

sed

sed -ne '1s/.*/Hello, World!/p'

bc

#!/usr/bin/bc -q
print "Hello World"
quit

Small Basic

Basic
TextWindow.WriteLine("Hello, World!")

SNOBOL

OUTPUT = "Hello, World!"
END

Smalltalk

Transcript show: 'Hello, World!'









作者: 我叫史迪奇
本文来自于: https://sdq3.link/HelloWorld.html博客内容遵循 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 协议