各种编程语言的 Hello Word

Jave

class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!"); 
    }
}

Python

print("Hello World")

C

#include <stdio.h>
int main() {
   printf("Hello, World!");
   return 0;
}

C#

namespace HelloWorld
{
    class Hello {         
        static void Main(string[] args)
        {
            System.Console.WriteLine("Hello World!");
        }
    }
}

C++

#include <iostream>

int main() {
    std::cout << "Hello World!";
    return 0;
}

Go

package main

import "fmt"

func main() {  
    fmt.Println("Hello World")
}

HTML

<html>
<header>
    <title>This is title</title>
</header>

<body>
    Hello world
</body>

</html>

Ruby

puts 'Hello, world!'

Bat

SELECT ‘Hello world!’ FROM systables where tabid = 1;

PHP

<?php echo 'Hello World'; ?>

Autoit 3

msgbox(0,"","Hello World")

更多编程语言的Hello Word,请参考以下内容:

使用200种编程语言说“Hello Word”

用28种不同的编程语言说“ Hello Word”

Scroll to Top