/HelloWorld

每天一句。

Primary LanguageC++

HelloWorld

- C HelloWorld 模板

#include <stdio.h>

int main(int argc, char *argv[])
{
    printf("%d -> Hello World\n", 0x0000);
    return 0;
}

- C++ HelloWorld 模板

#include <iostream>

int main(int argc, char *argv[])
{
    std::cout << 0x0000 << " -> Hello World" << std::endl;
    return 0;
}

- Golang HelloWorld 模板

package main

import "fmt"

func main() {
    fmt.Printf("%d -> Hello World\n", 0x0000);
}

- Java HelloWorld 模板

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println(0x0000 + " -> Hello World");
    }
}

- Scheme HelloWorld 模版

(begin
    (display (string-append (number->string #x0000) " -> Hello World" ))
    (newline)
)

- Python HelloWorld 模板

print(0x0000, " -> Hello World", sep='', end='\n')

- Haskell HelloWorld 模板

putStrLn $ show(0x0000) ++ " -> Hello World"

- JavaScript HelloWorld 模板

console.log(0x0000 + " -> Hello World");