This repository contains code that outputs "Hello World" to stdout in various programming languages. "Hello World" programs are typically the first code most new comers use to interface with a programming language. Per this Stackoverflow answer such programs were first used by Brian Kernighan and Martin Richards at Bell Labs during 1970s and tradition has since been honored by many new programming language books, tutorials and courses.
with Ada.Text_IO;
use Ada.Text_IO;
procedure AdaHelloWorld is
begin
Put_Line ("Hello World");
end AdaHelloWorld;#!/usr/bin/bash
echo "Hello World";using System;
class Program {
static void Main() {
Console.WriteLine("Hello World");
}
}#include <iostream>
int main(int argc, char** argv) {
std::cout << "Hello World" << std::endl;
return 0;
}#include <stdio.h>
int main(int argc, char** argv) {
printf("Hello World\n");
return 0;
}body::after {
content: "Hello World";
}IO.puts "Hello World"% Module deliberately misspelt to avoid conflict with system module with same
-module(erlaang).
-export([hello_world/0]).
hello_world() -> io:fwrite("Hello World\n").printfn "Hello World\n"package main;
import "fmt"
func main() {
fmt.Println("Hello World")
}main :: IO()
main = putStrLn "Hello World"<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>class Java {
public static void main(String[] args) {
System.out.println("Hello World");
}
}console.log("Hello World");print("Hello World")open Printf;;
Printf.printf "Hello World\n";;#!/usr/bin/perl
print "Hello World\n":- initialization(main).
main :- writef("%s\n", ["Hello World"]).#!/usr/bin/env python
if __name__ == '__main__':
print("Hello World")print("Hello World")#!/usr/bin/ruby
print "Hello World\n"fn main() {
println!("Hello World");
}