in reply to maths-thing
like so:if ($x == "0"){ $num_c = $num_a + $num_b } if ($x == "1"){ $num_c = $num_a - $num_b } if ($x == "2"){ $num_c = $num_a * $num_b }
And there is really nothing wrong with the way you store the high score, but you might be better off in the long run keeping a format like:# ... my $equat = "$num_a $symbols[$x] $num_b"; print "$equat = "; # ... $num_c = eval $equat; # ...
score:namein case you want to keep a top 10 list - much easier to parse. :)
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: (jeffa) Re: maths-thing
by Gordy (Scribe) on Sep 02, 2002 at 13:43 UTC |