Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a Perl script that reads a number from the keyboard andprints the number f

ID: 3611040 • Letter: W

Question

Write a Perl script that reads a number from the keyboard andprints the number followed by "is positive", "is negative" , or "iszero" depending on the value read in. The script should keepreading values until Ctrl + d is pressed at the keyboard. Write thescript and test it. Write a Perl script that reads a number from the keyboard andprints the number followed by "is positive", "is negative" , or "iszero" depending on the value read in. The script should keepreading values until Ctrl + d is pressed at the keyboard. Write thescript and test it.

Explanation / Answer


Dear, #!/usr/bin/perl -w   print"Please enter number "; chomp($num =<STDIN>); if ($num< 0) {    print "an negitivenumber."; } elsif ($num ==0) {     print"zero."; } else   {      print "an positivenumber."; } I hope this ishelpful for you......
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote