Hello World in different languages


python

print ("Hello World!")

c++

#include <iostream>
using namespace std;
int main()
{
    cout<<"Hello World!"<<endl;
    return 0;
}

c

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

ruby

puts "Hello World!"

php

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

javascript

console.log("Hello World!");

java

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

perl

#!/usr/bin/perl
use strict;
use warnings;
print("Hello World\n");