Question: Write a Perl program that allows the user to input a 5-digit nonnegative integer number between 10000 and 99999 , separates that number into its

Write a Perl program that allows the user to input a 5-digit nonnegative integer number between 10000 and 99999 , separates that number into its individual digits and then prints the digits to the screen separated from one another by three spaces each.

Requirement: 1.Do not use loops, arrays or the split or substr functions for this.

2.Use the smart-match operator, relational operators, if conditional statements, the given statement and Boolean logical operators.

Sample Run1:

Enter a five-digit number: 68182

6 8 1 8 2

2:Enter a five-digit number: 1234

ERROR: Your number must be in the range 10000 and 99999.

3: Enter a five-digit number: 01234

ERROR: Your number must be in the range 10000 and 99999.

4:Enter a five-digit number: 991233

ERROR: Your number must be in the range 10000 and 99999.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!