Question: 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

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

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!