Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

what the error in this program main.pl untited 1 print (please enter your first name: ); input $name print (please enter two numbers: ); input

what the error in this program
image text in transcribed
main.pl untited 1 print ("please enter your first name: "); input \$name print ("please enter two numbers: "); input \$number 1 input \$number2 if $ number2 =0 : print ("Please enter a non-zero number (you entered" + \$number 2+" print ("exiting this program. n" ) print ("menu:") print ("1 - add numbers") print ("2 - multiply numbers") print ("3 - compute modulus of numbers") print ("please enter your selection (13) : "); input \$answer print (\$name + "you splected" + \$answer) if $ answer =1: $ sum $ number 1+$ number 2 print (\$number 1+"+ " \$number 2+" is +$ sum) if \$answer =2 : \$prod =$ number 1 * \$number 2 print (\$number 1+""+$ number 2+" is " +$ prod) if \$answer ==3 : $ mod =$ number 1% number 2 print (\$number 1+ " n+ number 2+ is +$mod) exit scalar found where operator expected at main.pl line 18, near mH+H Snum! (Missing operator before \$number2?) Execution of main.pl aborted due to compilation errors. ...Program finished with exit code 255 Press ENTER to exit console

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions

Question

Q: How do you recruit employees?

Answered: 1 week ago