Answered step by step
Verified Expert Solution
Question
1 Approved Answer
User will enter string defining distance in either inches or feet until -1 is entered. Produce the total length in inches, e.g. Enter next value:
User will enter string defining distance in either inches or feet until -1 is entered. Produce the total length in inches, e.g. Enter next value: 3 feet Enter next value: 0.5 Feet Enter next value: 5 inches Enter next value: 2 FEET Enter next value: -1 Total 71 inches Extra challenges: a) assume there may be any number of spaces separating the numeric value from the string b) allow both feet and inches to be entered on one line, e.g. 3 feet 2 inches or, even 3 inches 7 feet
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