我高考专业是在知道什么不想选,然后在剩下的里面挑一个的情况下,选择了计算机。一开始并没有什么兴趣可言,直到我接触了很多种语言之后,反复在每种语言学习的一开始,输出一个“ hello world ”。我开始觉得技术是一件很有意思的事,甚至有一瞬间觉得是神圣的。这算是我对计算机的热情和兴趣被点燃的时刻,为了纪念这一时刻,有了这一短篇。我将在这里,用各种我学过的语言输出一遍“ hello world ”。

本文并非是专业技术性博客,所以对于编程语言和标记语言不作区分,只要我学过,且我想,就会出现。由于标记语言有很多种输出格式,本文统一采用正文格式,或随机一种格式。

然后因为我学的语言会越来越多,所以这个短篇理论上永不完结(也有可能变成一个小长篇)。

1
2
3
4
5
#include<stdio.h>
int main() {
printf("hello world\n");
return 0;
}
1
2
3
4
5
6
#include<iostream>
using namespace std;
int main() {
cout << "hello world" << endl;
return 0;
}
1
print("hello world")
1
2
3
4
5
6
7
8
9
<!DOCTYPE html>
<html>
<head>
<title>hello world</title>
</head>
<body>
<p>hello world</p>
</body>
</html>
1
console.log("hello world");
1
2
3
4
\documentclass{article}
\begin{document}
hello world
\end{document}
1
hello world
1
echo "hello world"
1
2
3
4
5
public class HelloWorld {
public static void main(String[] args) {
System.out.println("hello world");
}
}
1
2
3
fn main() {
println!("hello world");
}