1.C语言
#include <stdio.h>
int main(void) {
printf("Hello, World!\n");
return 0;
}
2.C#语言
using System;
internal static class HelloWorld {
private static void Main() {
Console.WriteLine("Hello, World!");
}
}
3.C++语言
#include <iostream>
using namespace std;
int main() {
cout << "Hello, World!" << endl;
return 0;
}
4.Java语言
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
5.JavaScript语言
document.write('Hello, World!');
7.PHP语言
<? echo "Hello, World!" ?>
6.Python语言
print("Hello, World!")
8.汇编语言
bdos equ 0005H ; BDOS entry point
start: mvi c,9 ; BDOS function: output string
lxi d,msg$ ; address of msg
call bdos
ret ; return to CCP
msg$: db 'Hello, world!$'
end start
9.SQL结构化查询语言
CREATE TABLE message (text char(15));
INSERT INTO message (text) VALUES ('Hello, World!');
SELECT text FROM message;
DROP TABLE message;
10.Go语言
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
以上就是博主大学期间学习和接触到的语言,哈哈,做个记录,虽然是简单的hello world,但众所周知,一切都从此开始.........
希望可以帮助到刚入门的小白和同爱知识拓展的朋友们。
谢谢观看!