这篇文章列出了TIOBE指数TOP50的编程语言(TIOBE Index - TIOBE)如何写“Hello World!”。“Hello World!”代码应该是每个程序员学习一门编程语言最先实现的程序,给我们带来了很多美好的回忆,下面我们就一次过足瘾,看看如何使用2023年TIOBE指数TOP50的编程语言写“Hello World!”。
print("Hello World")
#include <stdio.h>
int main() {
printf("Hello World");
return 0;
}
#include <iostream>
int main() {
std::cout << "Hello World";
return 0;
}
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
using System;
class Program {
static void Main(string[] args) {
Console.WriteLine("Hello World");
}
}
console.log("Hello World");
<?php echo "Hello World"; ?>
Module Module1
Sub Main()
Console.WriteLine("Hello World")
End Sub
End Module
SELECT 'Hello World';
section .text
global _start
_start:
mov edx, len ;message length
mov ecx, msg ;message to write
mov ebx, 1 ;file descriptor (stdout)
mov eax, 4 ;system call for sys_write
int 0x80 ;call kernel
mov eax, 1 ;system call for sys_exit
int 0x80 ;call kernel
section .data
msg db 'Hello, world!',0xa ;our dear string
len equ $ - msg ;length of our dear string
"say" block with "Hello World"
program hello
print *, 'Hello World'
end program hello
package main
import "fmt"
func main() {
fmt.Println("Hello World")
}
disp('Hello World')
fun main() {
println("Hello World")
}
program HelloWorld;
begin
WriteLn('Hello World');
end.
print("Hello World")
fn main() {
println!("Hello World");
}
puts "Hello World"
print("Hello World")
:- initialization(main).
main :- write('Hello World'), nl.
import std.stdio;
void main() {
writeln("Hello World");
}
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
PROCEDURE DIVISION.
DISPLAY 'Hello World'.
STOP RUN.
data _null_;
put 'Hello World';
run;
Sub Main()
MsgBox "Hello World"
End Sub
printfn "Hello World"
? "Hello World"
with Ada.Text_IO;
procedure Hello is
begin
Ada.Text_IO.Put_Line("Hello World");
end Hello;
print "Hello World\n";
WScript.Echo "Hello World"
void main() {
print('Hello World');
}
println("Hello World")
PRINT 'Hello World';
#import <Foundation/Foundation.h>
int main() {
NSLog(@"Hello World");
return 0;
}
print("Hello World")
object HelloWorld extends App {
println("Hello World")
}
static void Job1(Args _args)
{
info("Hello World");
}
console.log("Hello World");
(print "Hello World")
main = putStrLn "Hello World"
print "Hello World\n";
." Hello World"
(display "Hello World")
(newline)
WRITE 'Hello World'.
BEGIN { print "Hello World" }
print [Hello World]
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello World');
END;
<cfoutput>Hello World</cfoutput>
Write-Host "Hello World"
trace("Hello World");