Write a unit conversion program that converts english units


Conversion between Metric and Nonmetric Units

English Metric

1 Ounce (oz) 28.3495 grams (g)

1 pound (lb) 453.6 grams (g)

1 inch(in) 2.54 centimeter (cm)

1 foot (ft) 30.5 centimeter (cm)

1 mile (mi) 1.609 kilometer (km)

Write a unit conversion program that converts English units to Metric using the conversion table given above. Ask the user from which unit they want to convert ( oz, lb, in, ft, mi) and which unit they want to convert to (g, kg, cm, and km). Reject incompatible conversions such as gal - > km, ask for the value to be converted; then display the result. Here is an example:

Convert from? gal

Convert to? ml

Value? 2.5

2.5 gal = 9462.5 ml

Submit code with a sample outputs (provide multiple examples of output).

Solution Preview :

Prepared by a verified Expert
Dissertation: Write a unit conversion program that converts english units
Reference No:- TGS01701740

Now Priced at $35 (50% Discount)

Recommended (98%)

Rated (4.3/5)