Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++, write a program that asks the user if he or she wants to convert from feet and inches to meters and centimeters or

In C++, write a program that asks the user if he or she wants to convert from feet and inches to meters and centimeters or from meters and centimeters to feet and inches. The program then performs the desired conversion. Include a loop that lets the user repeat this computation for new input values until the user says he or she wants to end the program. Use many small functions to solve this problem. Here is the sample output:

image text in transcribed

Also if the user enters any number except 1 or 2 it must prompt the user "enter 1 or 2 only", until a correct response. Sample output:

image text in transcribed

Also only the first character of the user's input in reponse matters to convert more. If the first character entered is 'Y' or 'y', then the program continues. Any other response is interpreted as no. Sample output:

image text in transcribed

bash-4.3$./lengths enter 1 for feet,inches to meters,centimeters, or enter 2 for meters,centimeters to feet,inches 1 enter feet and inches 10 3 conversion: 3 meters and 12 centimeters convert more? enter 1 for feet,inches to meters,centimeters, or enter 2 for meters,centimeters to feet,inches 2 enter meters and centimeters 1 42 conversion: 4 feet and 7 inches convert more? no -bash-4.3$

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions