Other Tutorials

How to write hello world program in 25 different programming languages

How to write hello world program in 25 different programming languages

Introduction

In this article, I will explain how to write a hello world program in 25 different programming languages in a simple and easy way.

The first program every programmer writes when he/she starts to learn any programming language is Hello World.

Hello World is supposed to be one of the easiest programs in all most all programming languages. It often represents the basic syntax of any programming language for a practical program and used to introduce beginning programmers to a programming language.

Write  “Hello World” program In 25 Different Famous Programming Languages

1. Hello World Bash

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

2. Hello World C

#include<stdio.h>
main()
{
    printf("Hello World");
}

3. Hello World C++

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

4. Hello World C#

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

5. Hello World COBOL

Identification Division.
 Program-ID. sampleCOBOL.

 Data Division.

 Procedure Division.
 Main-Paragraph.
 Display "Hello World!"
 Stop Run.

6. Hello World Go

package main
import fmt "fmt"
func main() 
{
 fmt.Printf("Hello, World!\n");
}

7. Hello World Haskell

module Main (main) where
main = putStrLn "Hello, World!"

8. Hello World Java

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

9. Hello World JavaScript

<script language="JavaScript">
 document.write('Hello, World!');
</script>

10. Hello World JQuery

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

11. Hello World Objective C

#import <Cocoa/Cocoa.h>
@interface hello : NSObject {
}
@end
@implementation hello
-(void)awakeFromNib
{ 
 NSRunAlertPanel(@"Message from your Computer", @"Hello, World!", @"Hi!",
 nil, nil);
}
@end

12. Hello World Pascal

program hello;
begin
writeln('Hello, World!');
end.

13. Hello World Perl 6

say "Hello world!";

14. Hello World PHP

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

15. Hello World Python

print "Hello, world!"

16. Hello World Ruby

puts "Hello, World!"

17. Hello World Scala

object HelloWorld with Application
{
 Console.println("Hello, World!");
}

18. Hello World SQL

CREATE TABLE message (text char(15));
INSERT INTO message (text) VALUES ('Hello, World!');
SELECT text FROM message;
DROP TABLE message;

19. Hello World Swift

println("Hello World!")

20. Hello World Visual Basic .NET

Imports System
Public Module modmain
Sub Main()
 Console.WriteLine ("Hello World using Visual Basic!")
 End Sub
End Module

21. Hello World Lisp

(format t "Hello, World!~%")

22. Hello World Kotlin

package demo 
fun main(args : Array)
{ 
  println("Hello, world!") 
}

23. Hello World R

cat("Hello world\n")

24. Hello World Matlab

disp('Hello world')

25. Hello World Delphi

program Hello_World;
uses
    Windows;
 
    begin
        ShowMessage("Hello, World!");
 
    end.

Conclusion

This is all about how you can write a hello world program in 25 different programming languages in a simple and easy way.

Thanks for your support we will provide more tricks & tips for you. If you like our tricks, share these with your friends and join my Telegram Channel for more new tricks & tips.

Leave a Comment

error: Sorry Friend , You Are not Able To Copy My Data ~Narendra
Open chat
How can i help you ?