Hello World In Seven Languages!
According to the Modern Language Association of America the rankings, from highest to lowest, for enrollments in languages other than English in United States institutions of higher education are Spanish, French, German, Italian, Japanese, Chinese, Arabic. This doesn’t include ASL (American Sign Language) which was currently ranked 4th. So, let’s try to say “Hello World!” in each of these languages.
- Spanish – hola mundo
- French – bonjour monde
- German – hallo Welt
- Italian – ciao mondo
- Japanese – こんにちは世界
- Chinese – 你好世界
- Arabic – أهلا العالم
Ok, that’s all well and good but according to Forbes learning one of the more valuable foreign languages may only translate into a 4% income boost on average. That gain is luke warm compared to what one might gain by simply staying in school an extra year which an alternative study mentions gains may range from 8% to 14%.
Now, let’s get on to the fun stuff, programming languages. According to the TIOBE Programming Community Index for January 2011 the rankings, from highest to lowest, for most popular programming languages are Java, C, C++, PHP, Python, C#, and (Visual) Basic. The TIOBE Programming Community Index is a gauge that has long tracked the rise and fall of programming languages, first developed during the mid-1990′s. So, let’s try to say “Hello World!” in each of these languages.
1. Java
class myfirstjavaprog
{
public static void main(String args[])
{
System.out.println("Hello World!");
}
}
2. C
#include<stdio.h>
main()
{
printf("Hello World!");
}
3. C++ (pronounced C plus plus)
#include <iostream.h>
main()
{
cout << "Hello World!";
}
4. PHP
<?php
print "Hello World!";
// you can also use echo instead of print
echo "Hello World!";
?>
5. Python
print 'Content-Type: text/plain' print '' print 'Hello world!'
6. C# (pronounced C sharp)
public class Hello1
{
public static void Main()
{
System.Console.WriteLine("Hello World!");
}
}
7. (Visual) Basic
Imports System
Public Module modmain
Sub Main()
Console.WriteLine ("Hello World!")
End Sub
End Module
If you enjoy programming as much as I do you’ll learn to write code in a variety of different languages including the ones mentioned here and many more. Happy coding!
How do you say “Hello World” in your favorite programming language?
RSS Posts