Dr. Georgiana Hamza-Lup
due February 19, at 11:59 pm
volume from the metric system to the US system and from the US system to the metric system.
Before asking the user for the value to be converted, the program should prompt the user to select the
type of conversion:
Length (feet ↔
meters: there are 3.2808 feet in a meter)
Ask if the conversion is from feet to meters
from meters to feet
Weight (pound ↔
kilograms: there are 2.2046 pounds in a kilogram)
Ask if the conversion is from pounds to kilograms
Or from kilograms to pounds
Volume (gallons ↔
liters: there are 3.7854 litters in a gallon)
Ask if the conversion is from gallons to liters
Or from liters to gallons
The program should output the original value and the converted value in the correct units.
Then it should prompt the user for another calculation. If the response is ‘Y’ or ‘y’ the program will be
repeated. A response of ‘N’ or ‘n’ will cause the program to exit. Any other response will re-display
The program must consist of a minimum
of 4 user defined functions.
Embed the script in an html file, name that file
This is the end of the preview. Sign up
access the rest of the document.