"Hello World" in multiple programming languages




 Every programming language has its unique way to code. One of the great ways to compare each of them is to see each of the source code that is for the same purpose. In this post, you are going to see some source codes that print out the same "Hello, World! voltexpixel.com" but written in many languages.

Java

package com.voltexpixel.test;

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


C

#include <stdio.h>

int main(void)
{
    printf("Hello World! voltexpixel.com\n");
    return 0;
}

C++

#include <iostream>

int main ()
{
    std::cout << "Hello World! voltexpixel.com\n";
    return 0;
}

C#

(a.k.a. C++++)

using System;

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

Python

(My #1 favorite)

 print("Hello World! voltexpixel.com");

PHP

(My #2 favorite)

  
<?php
     echo "Hello World! voltexpixel.com"
?>

JavaScript


document.write("Hello World! voltexpixel.com");
// or
alert("Hello World! voltexpixel.com");
// or
console.log("Hello World! voltexpixel.com");

Visual Basic .NET


Module Hello

    Sub Main()
        Console.WriteLine("Hello World! voltexpixel.com")
    End Sub

End Module

Ruby


puts "Hello World!"

Lua

print("Hello World! voltexpixel.com")

Go

package main

import "fmt"

func main() {
    fmt.printIn("Hello World! voltexpixel.com")
}

Swift

print("Hello World! voltexpixel.com")

Scala

object HelloWorld extends App {
    printIn("Hello World! voltexpixel.com")
}

FiM++

(a.k.a. Friendship Reports, My Little Pony: Friendship is Magic Programming Language)

I said “Hello World! voltexpixel.com”!


Hope this post helped you a bit :)

Follow Voltex Pixel

Comments

Popular posts from this blog

Get FAR AWAY by Voltex Pixel

What is a VPN?