4
Aug
2011
Gallery of Hello World!
By Eric Downing. Filed in C/C++, C#, Java, Perl, PHP, Programming, Python, Ruby, Rust, Shell |Here is a list of the Hello World Programs for different languages:
C
#include <stdio.h>
int main()
{
printf("Hello World!");
}
C++
#include <iostream.h>
int main()
{
cout << "Hello World!" << endl;
}
C#
public class HelloWorld
public static void Main()
{
System.Console.WriteLine("Hello World!");
}
Java
class HelloWorld {
static void main(String[] args)
{
System.out.println("Hello World!");
}
SHELL
echo "Hello World"
Python 2
print "Hello World!\n"
Python 3
print ("Hello World!")
Ruby
puts "Hello World!"
Perl
print "Hello World!n";
PHP
<?php
print "Hello World!";
?>
Rust
fn main() {
println("Hello World!");
}
This is the simplest form of Hello World for most of these languages.