Programming

“Hello, World!” in different languages 

The first step of every programmer is to print out the “Hello, World!” text. It doesn’t matter which language you learn first, the first must will be this.

Maybe sometimes you just want to know that, how to print out the “Hello, World!” text in another programming language.  Today, I’m going to tell you that. I’m going to tell you how to print the “Hello, World!” text in other programming languages. Let’s get started.

“Hello, World!” in C

#include <stdio.h>

int main() {
   printf("Hello, World!");
   return 0;
}

“Hello, World!” in C++

#include <iostream>

int main() {
    std::cout << "Hello, World!";
    return 0;
}

“Hello, World!” in C#

using System;

class HelloWorld {
    static void Main() {
        Console.WriteLine("Hello, World!");
    }
}

“Hello, World!” in Python

print("Hello, World!")

“Hello, World!” in Java

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



“Hello, World!” in JavaScript

console.log("Hello, World!");

“Hello, World!” in TypeScript

console.log('Hello, World!');

“Hello, World!” in PHP

<?php
    echo "Hello, World!";
?>

“Hello, World!” in R

cat("Hello, World!")

“Hello, World!” in Go

package main

import "fmt"

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

“Hello, World!” in Swift

print("Hello, World!")

“Hello, World!” in Rust

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

“Hello, World!” in Visual Basic .NET

Module HelloWorld
    Sub Main()
        Console.WriteLine("Hello, World!")
    End Sub
End Module

“Hello, World!” in SQL

SELECT 'Hello, World!';

Read More: How to convert a list into a dictionary in Python

“Hello, World!” in Assembly language

section .data
    msg db 'Hello, World!', 0
    len equ $-msg

section .text
    global _start

_start:
    ; write message to stdout
    mov eax, 4
    mov ebx, 1
    mov ecx, msg
    mov edx, len
    int 0x80

    ; exit program with 0 status
    mov eax, 1
    xor ebx, ebx
    int 0x80

“Hello, World!” in MATLAB

fprintf('Hello, World!\n');

“Hello, World!” in Ruby

puts "Hello, World!"
print "Hello, World!\n";

“Hello, World!” in Kotlin

fun main() {
    println("Hello, World!")
}

“Hello, World!” in Lua

print("Hello, World!")

“Hello, World!” in Fortran

program hello
    print *, "Hello, World!"
end program hello

“Hello, World!” in COBOL

IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
PROCEDURE DIVISION.
    DISPLAY "Hello, World!".
    STOP RUN.

“Hello, World!” in Lisp

(print "Hello, World!")

“Hello, World!” in Ada

with Ada.Text_IO;
procedure Hello is
begin
    Ada.Text_IO.Put_Line("Hello, World!");
end Hello;

“Hello, World!” in Dart

void main() {
  print('Hello, World!');
}

“Hello, World!” in Scale

object HelloWorld {
  def main(args: Array[String]) {
    println("Hello, World!")
  }
}

“Hello, World!” in Prolog

:- initialization(main).
main :- write('Hello, World!'), nl, halt.



“Hello, World!” in D

import std.stdio;

void main()
{
    writeln("Hello, World!");
}

“Hello, World!” in Bash

#!/bin/bash
echo "Hello, World!"

“Hello, World!” in PowerShell

Write-Output "Hello, World!"

“Hello, World!” in Haskell

main :: IO ()
main = putStrLn "Hello, World!"

“Hello, World!” in Brainf**k

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.

“Hello, World!” in BCPL

GET "terminal" TO terminal$;
PUT terminal$, "Hello, World!^J";

“Hello, World!” in B

main( ) {
    extrn a, b, c;
    putchar(a); putchar(b); putchar(c); putchar('!*n');
}
a 'H';
b 'e';
c 'l';

“Hello, World!” in SAS

data _null_;
    put 'Hello, World!';
run;

“Hello, World!” in Julia

println("Hello, World!")

“Hello, World!” in Visual FoxPro

? "Hello, World!"

“Hello, World!” in Logo

print [Hello, World!]

“Hello, World!” in Binary

01001000 01100101 01101100 01101100 01101111 00101100 00100000 01010111 01101111 01110010 01101100 01100100 00100001

“Hello, World!” in CPL

BEGIN
    OUTSTRING('Hello, World!');
END

“Hello, World!” in Speakeasy

WHISPER "Hello, World!"



“Hello, World!” in JOSS

.@print "Hello, World!"

“Hello, World!” in Malbolge

(=<`#9]~6ZY32Vx/4Rs+0No-&Jk)"Fh}|Bcy?`=*z]Kw%oG4UUS0/@-ejc(:'8dc

“Hello, World!” in Whitespace

  		 	
  
   		 	
  
  			 	
  
   			 	
  
  			 	
  
   			 	
  
  			 	
  
   			 	
  
  			 	
  
   			 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  		 	
  
   		 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  		 	
  
   		 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  		 	
  
   			 	
  
  			 	
  
   		 	
  
  			 	
  
   			 	
  
  		 	
  
  		 	
  
   		 	
  
  

“Hello, World!” in Intercal

PLEASE NOTE: THIS PROGRAM IS WRITTEN IN INTERCAL.

DO ,1 <- #13
PLEASE DO ,1 SUB #1 <- #238
DO ,1 SUB #2 <- #108
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #194
DO ,1 SUB #7 <- #48
PLEASE DO ,1 SUB #8 <- #22
DO ,1 SUB #9 <- #248
DO ,1 SUB #10 <- #168
DO ,1 SUB #11 <- #24
DO ,1 SUB #12 <- #16
PLEASE READ OUT ,1
PLEASE GIVE UP



“Hello, World!” in LOLCODE

HAI
CAN HAS STDIO?
VISIBLE "Hello, World!"
KTHXBYE

I wrote, “Hello, World!” code in 46 different programming languages. I hope you like this article.

Yes, I know that some of the languages are not even workable programming languages. This article is just to know what it’s like to print “Hello, World!” in other languages.

If you know any other programming language then let me know in the comment section.

What is your reaction?

0
Excited
0
Happy
0
In Love
0
Not Sure
0
Silly

Leave a reply

Your email address will not be published. Required fields are marked *