Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

DarkKnightRadick (4259)

DarkKnightRadick
  jnagyjr@joseph-a-nagy-jr.us
http://www.joseph-a-nagy-jr.us/
AOL IM: pres CTHULHU (Add Buddy, Send Message)
Yahoo! ID: pagan_prince (Add User, Send Message)
Jabber: DarkKnightRadick@jabber.org

No solicitors.
Tuesday July 01, 2003
02:18 PM

My Tribute to Douglas Adams

[ #13181 ]
#!/usr/bin/perl -w
#I have a feeling the answer will be 42

print "I have a feeling the answer will be the answer to Life! The Universe! And Everything!\n";
print "Please input the first number:";
chomp($first_num = <stdin>);
print "Please input the second number:";
chomp($second_num = <stdin>);
$answer = $first_num * $second_num;

if ($answer != 42) {
print "$first_num times $second_num is not the answer to Life! The Universe! And Everything! It's actually just $answer\n";
} else {
print "You know the answer to Life! The Universe! And Everything!\n";
}
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.