inherit
g4m3 0v3r
771
0
Jul 18, 2011 18:29:23 GMT -8
David (Monty)
3,669
December 1999
mbarker22
|
Post by David (Monty) on Jun 24, 2005 21:12:18 GMT -8
Pfft QBASIC is the best. lol.
PRINT "HELLO WORLD."
;D Lol, Qbasic is best for 8 year olds to program temperature converters.
|
|
inherit
The Jedi Master of Proboards PBS Oscars: Most Unique
6777
0
Nov 19, 2012 0:15:08 GMT -8
Tommy Huynh
Coffee isn't my cup of tea.
19,374
January 2003
swg2
|
Post by Tommy Huynh on Jun 24, 2005 21:29:58 GMT -8
public class Hello { public static void main (String [] args) { System.out.print("Hello World"); } }
|
|
inherit
The Himalayan Warrior
7453
theextelligence 16777215 theextelligence
0
Jul 24, 2012 21:13:38 GMT -8
♪ SHOUVIK ♪
http://outlineme.com/cancer10
4,715
February 2003
cancer10in
|
Post by ♪ SHOUVIK ♪ on Jun 25, 2005 4:38:05 GMT -8
public class Hello { public static void main (String [] args) { System.out.print("Hello World"); } } Thats java right?
|
|
squalleh
inherit
-746876
0
May 5, 2024 14:22:14 GMT -8
squalleh
0
January 1970
GUEST
|
Post by squalleh on Jun 25, 2005 5:22:23 GMT -8
Erm, C++, why not just teach him a simple print function? That's what he asked for I think...
#include <iostream.h> void main() { cout<<"Hello World."; }
It's that simple. And in Perl it would simply be: #!/usr/bin/perl -w print "Content-type: text/html\n\n"; print "Hello World."; Just going by that alone, Perl looks tremendously easier than C++, but that's not really true. #!/usr/bin/perl -wT print "Hello World!";
You don't even need the Content-type (you only need that if you're outputting to a browser)
public class Hello { public static void main (String [] args) { System.out.print("Hello World"); } } Thats java right? Yeah, that's Java alright. About as simple of a program as you can get, but it's a program none the less.
|
|
inherit
g4m3 0v3r
771
0
Jul 18, 2011 18:29:23 GMT -8
David (Monty)
3,669
December 1999
mbarker22
|
Post by David (Monty) on Jun 25, 2005 11:41:26 GMT -8
#!/usr/bin/perl -wT print "Hello World!";
You don't even need the Content-type (you only need that if you're outputting to a browser) I know. However most people use it for the web. I know how to run Perl scripts in a console, but really, a lot of people would never use Perl for that. When I use the -T or -t on my Perl host, the code crashes.
|
|
Lane Rendell
Junior Member
Your personal text will be displayed underneath your avatar.
Posts: 420
inherit
40805
0
Oct 30, 2005 17:13:52 GMT -8
Lane Rendell
Your personal text will be displayed underneath your avatar.
420
May 2005
lane7564
|
Post by Lane Rendell on Jun 25, 2005 12:16:30 GMT -8
Trust me, you don't want me to pm you about programming. I'll never leave you alone. *walks away* Ok It just goes like this: #include <iostream>
using std::cout;
int main() { cout << "Hello world!\n"; return 0; } Actually I use #include <iostream>
using namespace std;
int main() { cout<<"Test!\n"; return 0; }
|
|
EXTREME
New Member
Banned
ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW
Posts: 0
inherit
Banned
22038
0
Sept 22, 2009 18:29:47 GMT -8
EXTREME
ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW ECW
0
March 2004
extremehp4
|
Post by EXTREME on Jun 25, 2005 12:25:51 GMT -8
|
|
inherit
g4m3 0v3r
771
0
Jul 18, 2011 18:29:23 GMT -8
David (Monty)
3,669
December 1999
mbarker22
|
Post by David (Monty) on Jun 25, 2005 12:30:51 GMT -8
Actually I use #include <iostream>
using namespace std;
int main() { cout<<"Test!\n"; return 0; }
That works, but "using namespace std;" isn't really good form, as it defeats the purpose of namespaces (avoiding naming conflicts). There's times when you might need it, but usually "using std::cout;" or just replacing "cout" in the code with "std::cout" is better (same for endl, cin, etc.).
|
|