Question: Write a program that prompts the user to enter a length in feet and then enter a length in inches and outputs the equivalent length
Write a program that prompts the user to enter a length in feet and then enter a length in inches and outputs the equivalent length in centimeters. If the user enters a negative number or a nondigit number, throw and handle an appropriate exception and prompt the user to enter another set of numbers.
Your error message should read A non positive number is entered and allow the user to try again.
Format your output with setprecision to ensure the proper number of decimals for testing!
Task #: Throwing an exception
Task #: Converting to centimeter
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
