建站后的首篇文章,通过各种编程语言实现 “Hello,World!”,以此作为纪念。
C语言
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
C++ (CPP)
#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
Java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
C#
using System;
class HelloWorld {
static void Main() {
Console.WriteLine("Hello, World!");
}
}
Python
print("Hello, World!")
Go
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
JavaScript (JS)
console.log("Hello, World!");
评论