Write a program to convert a U.S. customary system length in miles, yards, feet and inches to metric system length in kilometers, meters and centimeters. The sample run is shown below. After the number of miles, yards, feet and inches are entered in the textboxes, the length should be converted entirely to inches and then divided by 39.37 to obtain the value in meters. The Int function should be used to break the total number of meters into kilometers and meters. The number of centimeters should be displayed to one decimal place. You must use the constants below, (see underlined bold text.) The needed input (see double underlined), output, constant and formulas are as follows Constants: inches in a mile (63360), inches in a yard (36), inches in a foot (12), inches to meters (39.37) Input: The user will enter the miles, yards, feet and inches.
Write a program to convert a U.S. customary system length in miles, yards, feet and inches to metric system length in kilometers, meters and centimeters. The sample run is shown below. After the number of miles, yards, feet and inches are entered in the textboxes, the length should be converted entirely to inches and then divided by 39.37 to obtain the value in meters. The Int function should be used to break the total number of meters into kilometers and meters. The number of centimeters should be displayed to one decimal place. You must use the constants below, (see underlined bold text.) The needed input (see double underlined), output, constant and formulas are as follows
Constants: inches in a mile (63360), inches in a yard (36), inches in a foot (12), inches to meters (39.37)
Input: The user will enter the miles, yards, feet and inches.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images