HELLO WORLD PROGRAM

************************************************************************ 

W.A.P TO PRINT "HELLO WORLD!"

************************************************************************ 

JAVA Program

  1. class Simple{  
  2.     public static void main(String args[]){  
  3.      System.out.println("Hello Java");  
  4.     }  

 

Save the above file as Simple.java.

To compile:javac Simple.java
To execute:java Simple   



  

Online compiler

Output:

Hello Java

************************************************************************ 

C Program

#include <stdio.h>
int main()
{
printf("Hello World!");
}
Save the above file as Simple.C. Compile and Run it.
Online Compiler 

Output

Hello, World!

 

************************************************************************ 

C++ Program

#include <iostream>
using namespace std;

int main()
{
    cout << "Hello, World!";
    return 0;
}
Online Compiler

Output

Hello, World! 

************************************************************************ 

C# Program

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace HelloWorld
{
    public class Program
    {
        public static void Main(string[] args)
        {
            Console.WriteLine("Hello, World!");
        }
    }
}
 
 
Output:
Hello World!

************************************************************************ 

PHP Program

<?php
    echo "Hello, world!!!!"
?>

Online Compiler

Output: 

 Hello World

************************************************************************ 

JAVASCRIPT Program

// the hello world program
console.log('Hello World'); 
  Save the above file as Simple.HTML. Run it. 

Online Compiler

Output: 

 Hello World

************************************************************************ 

PYTHON Program

 print("Hello World!")

Output:

 Hello World!

Online Compiler: 

 

************************************************************************  

Comments

Popular posts from this blog

Python Program to Find HCF or GCD

SAME NAME IN CLASS METHOD AND CONSTRUCTOR

CONVERT CARTESIAN COORDINATES TO POLAR COORDINATE