print "Hello World"
def main():
print "Hello World"
if __name__=='__main__':
main()
puts "Hello World"
[FONT="][B]
[/B][/FONT]class HelloWorld
{
public static void main()
{
System.out.println("Hello World");
}
}
#include<iostream.h>
#include<conio.h>
void main()
{
cout<<"Hello World";
getch();
}
[
C++
Code:#include<iostream.h> #include<conio.h> void main() { cout<<"Hello World"; getch(); }
#include<iostream>
int main()
{
std::cout<<"Hello World";
return 0;
}
Shouldn't there be String[] arguments in main()? (I know a crap about java but I think Java requires arguments for main as such)Disk_Junkie said:Code:[FONT="][B] [/B][/FONT]class HelloWorld { public static void main() { System.out.println("Hello World"); } }
You used the int return type and I used void. Yup I coded it according to Turbo C++. But thanks for your example...Er..um..this is not exactly according to standards. This is actually Turbo C++ taught in schools and colleges in India.
Anyway it should be
Code:#include<iostream> int main() { std::cout<<"Hello World"; return 0; }
Shouldn't there be String[] arguments in main()? (I know a crap about java but I think Java requires arguments for main as such)
It's Actually it's for a reason:You used the int return type and I used void. Yup I coded it according to Turbo C++. But thanks for your example...![]()
It's Actually it's for a reason:
*www.gidnetwork.com/b-66.html
thanks for the link.It's Actually it's for a reason:
*www.gidnetwork.com/b-66.html
#!/usr/bin/env ruby
puts "Hello World"
import std.stdio;
int main(char[][] args)
{
writefln("Hello World");
return 0;
}