
C
#include <stdio.h>
void main()
{
printf("Hello, world!\n");
}
C++
#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!");
}
}
Python/Ruby/R/Php
print("Hello, world!")
Go
package main
import "fmt"
func main() {
fmt.Println("Hello, world!")
}
Rust
fn main() {
println!("Hello, world!");
}
Kotlin
fun main(args: Array<String>) {
println("Hello, world!")
}
Matlab
disp("Hello, world!");