千鋒教育嵌入式物聯(lián)網(wǎng)教程800集,C語(yǔ)言編程入門(mén)到精通(物聯(lián)網(wǎng)開(kāi)發(fā)工程師必備視頻

一分鐘學(xué)會(huì)20種hello world
匯編語(yǔ)言
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
Fortran語(yǔ)言
PROGRAM Hello
WRITE (*,*) 'Hello, World!'
STOP
END
Lisp語(yǔ)言
(write-line "Hello, World!")
Cobol語(yǔ)言
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
PROCEDURE DIVISION.
??DISPLAY "Hello, World!"
??STOP RUN.
Basic語(yǔ)言
PRINT "Hello, World!"
END
C語(yǔ)言
#include <stdio.h>
?
int main(void) {
?printf("Hello, World!\n");
?return 0;
}
C++
#include <iostream>
using namespace std;
?
int main() {
?cout << "Hello, World!" << endl;
?return 0;
}
MATLAB語(yǔ)言
disp('Hello, World!')
perl語(yǔ)言
print "Hello, World!\n";
pyhton
print("Hello, World!")
LUA
print("Hello, World!")
RUBY
puts 'Hello, World!'
JAVA
class HelloWorld {
?public static void main(String[] args) {
??System.out.println("Hello, World!");
?}
}
JAVASCRIPT
document.write('Hello, World!');
PHP
<? echo "Hello, World!" ?>
C#
using System;
?
internal static class HelloWorld {
?private static void Main() {
??Console.WriteLine("Hello, World!");
?}
}
scala
object HelloWorld extends App {
?println("Hello, World!")
}
Go
package main
?
import "fmt"
?
func main() {
?fmt.Println("Hello, World!")
}
?Kotlin
fun main(args: Array<String>) {
??println("Hello, World!")
}
Julia
println("Hello, World!")