The number one program is Hello World. This program prints the string "Hello World".
1. [ VB ] Hello world
test text
1. [ Python ] Hello world
test text
1. [ C++ ] Hello world
iostream is part of the standard library that comes with
C++, iostream deals with input, output streams.
cout belongs to namespace std, it's full name is
std::cout
we can shorten this to cout by using the namespace.
The method
main is the one that
gets run.cout represents the standard
(console) output. The operator << takes an
output stream on the left
value to be output on the right.test text
1. [ C# ] Hello world
This web site will save your text in a file call Hello.cs and compiled
into Hello.exe
When a class is executed the system looks for a method called
Main and
starts execution there. If a class does not have a main method then it
may compile fine - but it cannot be executed. Try it.
Console is the standard output - on a command prompt
it simply goes to
the screen. In this environment I stick it on a web page.
test text
1. [ Java ] Hello world
System.out is the standard output stream.The method
println outputs
values and includes the "end-of-line" character.
test text
1. [ Perl ] Hello world
Strictly this is not part of the perl program - but it tells the
operating system what to do with the file. /usr/bin/perl is typically
where the perl executable is on a Linux system. It might be
c:/perl/bin/perl.exe on a Windows system.
This pragma makes perl check that variables have been declared,
you don't have to do this - but you should.
test text
1. [ Ruby ] Hello world
puts outputs a value (or a load of values) to the
standard output. It also starts a new line.
test text