"Hello World" for new-programer

"Hello World" Program

C program example:

#include 
int main(){
    printf("Hello World\n");
    return 0;
}

C++ program example:

#include 
using namespace std;
int main(){
    cout << "Hello World" << endl;
    return 0;
}

Java program example:

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

Php program example:


Javascript program example:

console.log("Hello World");

Shell program example:

!/bin/bash
echo "Hello World\n"

Compare six program language.

language study grade code length
c S B
c++ S A
java B S
php C C
javascript C B
shell A D

Thanks!

测试

你可能感兴趣的:("Hello World" for new-programer)