编程语言基本模板外壳

C

main.c

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

C++

main.cpp

1
2
3
4
5
6
7
8
9
10
#include <string>
#include <iostream>

using namespace std;

int main()
{
cout << "Hello" << endl;
return 0
}

Java

HelloWorld.java

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

C#

1
2
3
4
5
6
7
public class HelloWorld
{
public static void Main()
{
System.Console.WriteLine("Hello");
}
}

Golang

1
2
3
4
5
6
7
8
9
package main

import (
"fmt"
)

func main() {
fmt.Println("Hello,World!")
}
Author: chacebai
Link: http://www.spyhex.com/2016/language_template/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.