“Hello, World!” but in 30 different languages!!!

"Hello, World!" but in 30 different languages!!!

Since the last week, I was scratching my head to figure out what post can I write in dev? I wanted it to be meaningful so that it can be useful for the readers. Then, I thought, if I can’t write anything meaningful then I should write something absolutely meaningless. And here I am. Printing “Hello, World!” in 30 different languages(in no particular order). ENJOY!

[Spoiler alert: The last one is special!]

1. C

#include <stdio.h>
int main(void){
    printf("Hello, world!\n");
    return 0;

2. C++

#include <iostream>
int main(){
 std::cout << "Hello, World!\n";

3. C’#’

class HelloWorldApp{
 static void Main(){
 System.Console.WriteLine("Hello, world!");

4. Python

print("Hello, world!")

5. Java

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

6. JavaScript

document.writeln('Hello, World!');

7. TypeScript

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

8. R

cat("Hello, World!")

9. Rust

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

10. Go Lang

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

11. Lua

print("Hello, World")

12. Perl

use strict; 
use warnings; 

print("Hello, World!"); 

13. Haskell

Prelude> "Hello, World!"

14. Bash

echo 'Hello, world!'

15. Kotlin

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

16. Ruby

puts "Hello, World!"

18. Swift

import Swift
print("Hello, World!")

19. Julia

println("Hello, World!")

20. Dart

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

21. Elixir

IO.puts("Hello, World!")

22. Groovy

println "Hello, World!"

23. Scala

object dev
    // Main Method 
    def main(args: Array[String]) 
        // prints Hello World
        println("Hello, World!") 

24. Ada

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

25. Bosque

namespace NSMain;  
function main(): String {  
 return "Hello, world!";  


PRINT "Hello, world!"‚Äč

27. Cobol

display "Hello, world!".

28. D

import std.stdio;
void main()
    writeln("Hello, World!");

29. F’#’

open System
let main argv =
    printfn "Hello, World!"

30. BrainF*ck


Why not add a few more in the comment section?

Leave a Reply

Your email address will not be published.