Say “HELLO WORLD ” In Different Programming Languages

programming languages -hello world

In this post we are going to discuss about writing a program to print ” Hello World ” in different Programming Languages

Which is the most important part when you start learning a new programming language ? It is Printing Out “Hello World”.

In this article we will see how to write a program to pring “Hello World” in different programming languages.

NB:The execution steps may differ from programming languages.Here Only the code is given.So before simply copy pasting read the documentation of the respective programming language.

1-Bash

echo "Hello World"

2- C

printf("Hello World");   

3-C#

using System;
class Program
{
    public static void Main(string[] args)
    {
        Console.WriteLine("Hello, world!");
    }
}

4-C++

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

5-Coffee Script

console.log 'Hello, world!'

6-HTML

!HTML IS NOT A PROGRAMMING LANGUAGE.IT IS A MARKUP LANGUAGE

 Hello World!

7-java

public class HelloWorld {

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

}

8-Javascript

document.write('Hello, world!');

9-jQuery

$("body").append("Hello world!");

10-kotlin

fun main(args: Array<String>) {
    println("Hello World!")
}

11-Logo

print [Hello, world!]

12-Lua

print("Hello World!") 

13. MatLab

disp('Hello, world!')

14-Objective-C

int main(void)
{
    NSLog(@"Hello, world!");
    return 0;
}

15-Pascal

program HelloWorld;
begin
  WriteLn('Hello, world!');
end.

16-Perl

program HelloWorld;
begin
  WriteLn('Hello, world!');
end.

17-PHP

<?php 
Print "Hello, World!";
?>
<?php 
Echo "Hello, World!";
?>

18-Processing

void setup(){
  println("Hello, world!");
}

19-Python

print "Hello, world!"

20-R

cat('Hello, world!')

21-Ruby

puts "Hello, world!"

22-Rust

fn main() {

    println!("Hello World!");
}

23-Swift

println("Hello, world!")

25-Typescript

var message = "Hello World";  
  
function printIt() {  
    console.log(message);  
}  
printIt();  

24- Visual Basic .NET-

Module Module1
    Sub Main()
        Console.WriteLine("Hello, world!")
    End Sub
End Module

Similar Posts:

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

You May Also Like

About the Author: shakirck

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.