Hello World program

From Wikipedia, the free encyclopedia

(Redirected from Hello World)
Jump to: navigation, search

"Hello, World!" is usually a program made by computer programmers that are new to a programming language, or to test if the compiler for this language is working correctly. It will simply put the text "Hello, World!" on the screen. This program is used in most programming languages.[1]

Contents

[change] Hello World in C

#include <stdio.h>
int main()
{
      printf("Hello, World!\n");
}

[change] Hello World in Python

print "Hello, World!"

[change] Hello World in C++

#include <iostream>
 
int main(int argc, char** argv){
 std::cout << "Hello, World!" << std::endl;
}

[change] Hello World in C#

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

[change] Hello World in Java

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

[change] Hello World in Perl

#!/usr/local/bin/perl
print "Hello, world!\n";

[change] Hello World in PHP

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

[change] Hello World in Visual Basic

Imports System

Public Module modmain
   Sub Main()
     Console.WriteLine ("Hello, World!")
  End Sub
End Module

[change] Hello World in Visual FoxPro

? "Hello, world!"

[change] Hello World in DarkBASIC

 print "Hello, World!"

[change] Hello World in PASCAL

begin
  writeln("Hello, World!");
end.

[change] Hello World in Seed7

$ include "seed7_05.s7i";

const proc: main is func
  begin
    writeln("Hello, World!");
  end func;

[2]

[change] References

Personal tools
Create a book