Hello world

Hello world為一梗,於程序員中流傳,源於《Introduction to the Language B》一書示例程序之首,後用於入門編程語言的第一個程序。

各類代碼實現

ABAP

<source lang="abap"> REPORT Z_AKARIN_HELLO. WRITE 'Hello world!'. </source>

C

<source lang="c">

  1. include<stdio.h>

int main(){

   printf("Hello world!");

} </source>

C++

<source lang="cpp">

  1. include<iostream>

int main(){

   std::cout<<"Hello world!";

} </source>

Python

<source lang="py"> print("Hello world!") </source> <source lang="py"> import __hello__ </source>

Lua

Wenyan

<source> 吾有一言。曰「「問天地好在。」」。書之。 </source>