Hello World

C

#include <stdio.h>
 
int main(void)
{
    printf("Hello, World");
    return(0);
}

C++

#include <iostream>
using namespace std;

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

C++23

import std;

int main() {
    std::println("Hello, World!");
}

Java

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

Java 21

void main() {
    System.out.println("Hello, World!");
}

C#

using System;
class Program
{
    public static void Main(string[] args)
    {
        Console.WriteLine("Hello, World");
    }
}

C# 9.0

using System;

Console.WriteLine("Hello, World!");

C# 10

Console.WriteLine("Hello, World!");

Python

print("Hello, World!")

Rust

fn main() {
    println!("Hello World!");
}

Go

package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}

投票