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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started