Share This

Hello World In Different Languages

As with the famous trend of writing hello world as the first program in every beginner's site, we've written hello world programs in various different languages. So enjoy.

C

#include <conio.h>
int main()
{
printf("Hello World\n");
getch();
}

C#
class Hello {
  static void Main() {
    System.Console.Write("Hello World");
  }
 }

C++
#include <iostream>

using namespace std;

int main()
 {
  cout << "Hello, World." << std::endl;
 }

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

Javascript
document.writeln("Hello, World");

PERL
print "Hello World\n"

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

Python
print "hello world"

Ruby
puts "Hello, world"

Shell Scripting
#!/bin/sh
 echo "Hello World"

You can leave your addition in the comment section.

0 comments:

Post a Comment

Followers