CSCI 2000B
Spring 1999
Assignment 3
Date: 1/26/99 Due: 2/2/99 20 points
Write, enter, run, debug, and get working a QBASIC program to solve the following problem:
Your boss wants to become more acquainted with the metric system, so he/she wants you to
write a program to convert distances from the English system into the metric equivalent. The
user should be asked to input miles, feet, and inches and the program should display the
corresponding kilometers, meters, and centimeters.
You obviously need to know the conversions from miles to feet and feet to inches. The only
conversion factor necessary to get to the metric units is that approximately 39.37 inches are in a
meter. Remember that it takes 1000 meters to get a kilometer and there are 100 centimeters in a
meter. Figure out the problem by hand (with a calculator) and that should help you come up with
a program to do it.
Example:
2 miles, 100 feet, and 7 inches should yield
3 kilometers, 249 meters, and about 35.2 centimeters