1

Math Tool

view story
linux-howto

http://www.unix.com – Hi all, I am new to PERL scripts, and i have made my first script which i am posting here. This math tool performs all basic arithmatic functions. Code: #!/usr/bin/perl print "\t----------Welcome to Maths Tool-----------\n"; do { print "Enter your choice :"; print "\n\t1)Addition\n\t2)Subtraction\n\t3)Multiplication\n\t4)division\n"; $a = <>; if ($a == 1) { print "\nHow many numbers you wanna add...??\t"; chomp($b = <>); print "Enter $b numbers : \n"; for ($count = 1; $count <= $b; $count++) { $c = <>; $d = $d + $c (HowTos)