image
Hello World in 35 Programming Languages
#Programming languages #Programming #Coding

‚Äč
We have always wanted to know how to write "Hello World" in different programmig languages but some of us can only do that in 3 programming languages or so while others can do that in more than 10 programming languages.

In this articles we will try and look how to write Hello World in 35 different programming languages for I believe in any life of a [programmer he/she started from writing Hello World.

There are more than 35 programming languages out there but I decided to write the first 35 I could think of.

 

Fortran

PROGRAM Hello

WRITE (*,*) 'Hello World'

END PROGRAM Hello

Lisp

(write-line "Hello World")

 

COBOL

IDENTIFICATION DIVISION

PROGRAM-ID. HELLO-WORLD

PROCEDURE DIVISION.

DISPLAY "Hello World"

STOP RUN

 

BASIC

PRINT "Hello World"

END

 

Pascal

begin

  writeln('Hello World')

end

 

C

#include <stdio.h>


int main(void){

   printf("Hello World")

   return 0

}

 

SmallTalk

Transcript show: 'Hello, world!'; cr.

 

SQL

CREATE TABLE hello(text char(20));

INSERT INTO hello(text) VALUES ('Hello World');

SELECT TEXT FROM hello;

 

C++

#include <iostream>

using namespace std;

int main(){

   cout<< "Hello World" <<endl;

   return 0;

}

 

Common Lisp

(princ "Hello World")

 

MATLAB

disp('Hello World')

 

Objective-C

#import <Foundation/Foundation.h>

int main(){

   @autoreleasepool{

   NSLog(@"Hello World");

   }

}

 

Perl

print "Hello World";

 

Haskell

main = putStrLn "Hello World"

 

Python

print ("Hello World")

 

Visual Basic

Public Sub Main()

Debug.Print "Hello World"

End Sub

 

Lua

print("Hello World")

 

Bash

echo "Hello World"

 

Ruby

puts 'Hello World'

 

Java

class Hello {

public static void main(String args [] {

   System.out.println("Hello World")

   }

}

 

Javascript

document.write('Hello World')

 

PHP

<? echo "Hello World" ?>

 

C#

using System

internal static class Hello{

   private static void Main(){

      Console.WriteLine("Hello World")

   }

}

 

Groovy

println "Hello World"

 

Scala

object Hello extends App{

   println("Hello World")

}

 

F#

printfn "Hello World"

 

Windows Powershell

echo "Hello World"

 

Clojure

(println "Hello World")

 

Go

package main

import "fmt"

func main(){

   fmt.Println("Hello World")

}

 

Rust

fn main(){

   println("Hello World");

}

 

Dart

main(){

   print("Hello World");

}

 

Kotlin

fun main(args: Array<String>){

   println("Hello, World")

}

 

TypeScript

console.log("Hello World");

 

Swift

print("Hello World")

 

Julia

println("Hello World")

 

Conclusion

That's all I had for you in this article, if you are new to programming, you can pick a language and start your path towards being a pro in that particular language, all it takes is the first step.

See you soon and don't forget to hit that emoji below if it helped.

‚Äč