Your program seems to run fine, and (I'm assuming) does exactly what you want it to. So the following are all merely suggestions; as you have already achieved the primary goal of a working program ...
(which I like) or:if ($sign==5) { print "the Multiplication Table For $num1 and $num2 is \n"; for (1 ..$num2) { print "$_ X $num1 = ", $_ * $num1, "\n"; } }
but I think they are both preferrable to:if ($sign==5) { print "the Multiplication Table For $num1 and $num2 is \n"; for (1 ..$num2) { print "$_ X $num1 = ", $_ * $num1, "\n"; } }
which is misleading and erratic.if ($sign==5) { print "the Multiplication Table For $num1 and $num2 is \n"; for (1 ..$num2) { print "$_ X $num1 = ", $_*$num1, "\n"; } }
if (1 == $sign) { print "The Sum of the Numbers $num1 + $num2 is ", $num1 + $num2, " +\n"; } elif (2 == $sign) { print "The Difference of the numbers $num1 - $num2 is ",$num1 - $n +um2, "\n"; } elsif (3 == $sign) { print "The Product of $num1 X $num2 is ",$num1 * $num2 , "\n"; } elsif (4 == $sign) { print "The Division of $num1 / $num2 is ", $num1 / $num2 , "\n"; } elsif (5 == $sign) { print "the Multiplication Table For $num1 and $num2 is \n"; for (1 ..$num2) { print "$_ X $num1 = ", $_ * $num1, "\n"; } }
In reply to Re: My second script
by liverpole
in thread My second script
by hozefa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |