Hello, World!

N种语言的Hello, World!

  • Shell

    1
    2
    
    #!/bin/sh
    echo "Hello, World!"
    
  • Fortran

    1
    2
    3
    4
    
    program main
        implicit none
        print *,"Hello, World!"
    end program main
    
  • C

    1
    2
    3
    4
    5
    6
    
    #include <stdio.h>
    int main()
    {
        printf("Hello, World");
        return 0;
    }
    
  • Python

    1
    
        print("Hello, World!")
    
  • JavaScript

    1
    
    console.log("Hello, World!");
    
  • PHP

    1
    
    echo 'Hello, World!';
    
  • Go

    1
    2
    3
    4
    5
    
    package main
    import "fmt"
    func main(){
        fmt.Print("Hello, World!");
    }