Hello World Languages

From IAM MediaWiki Create Change
Jump to: navigation, search

Helloworld in several different programming languages

c

<c>#include <stdio.h> int main() {

   printf("Hello, World.");
   return -1;

}</c>

cpp

<cpp>#include <iostream>

using namespace std;

void main() {

  cout << "Hello World";

} </cpp>

java

<java>class HelloWorldApp {

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

}</java>

csharp

using System;
namespace HelloClass
{
    class HelloWorld
    {
        public static void Main()
        {
            Console.WriteLine("Hello World!");
        }
    }
}

perl

<perl>print "Hello World\n";</perl> OOP Class1