>all right, the only problem with the script you sent is that if it is = then the
>number is always 10, its you asign "le" or < then it is >always 0.
>here is what you sent. At least it works though.. I will keep working with it, and
>thank you
Not sure what exactly you mean by that. If you mean that it only works with a static
number ....Well do you want me to finish the script for you...or do you want to learn
something ?? look down if you want it with a random number
<~~~ Cut
$im_thinking_of=int(rand 10);
while(){
print "Pick a number:";
$guess=<STDIN>;
chomp $guess;
if ($guess>$im_thinking_of) {
print "You guessed too high!\n";
} elsif ($guess < $im_thinking_of) {
print "You guessed too low!\n";
} else {
print "You got it right!\n";
last;
}
}
<~~~ paste
----- Original Message -----
From: Mr.T Mr.X
To: Mark G
Sent: Sunday, June 15, 2003 2:40 AM
Subject: Re: I need to make this not end
all right, the only problem with the script you sent is that if it is = then the
number is always 10, its you asign "le" or < then it is always 0.
here is what you sent. At least it works though.. I will keep working with it, and
thank you
while(){
$im_thinking_of=10;
print "Pick a number:";
$guess=<STDIN>;
chomp $guess;
if ($guess>$im_thinking_of) {
print "You guessed too high!\n";
} elsif ($guess < $im_thinking_of) {
print "You guessed too low!\n";
} else {
print "You got it right!\n";
last;
}
}
------------------------------------------------------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!