Computer Programming I
Lab #2 - Metric Conversions (20 pts)
This will be
your first chance to write a program that really does something.
THE PROBLEM: Design and write a program that will
read in two numbers representing the height and weight of a person in the metric
system and convert them to the English system (inches and pounds). Use the formulas: 1 kilogram = 2.2 pounds
and 1 inch = 2.54 centimeters.
THE DESIGN: Recall the steps in problem-solving,
go through each one in this project.
Your top-down design, written on a computer, must be handed in as
comments at the top of your program.
The design must be very complete --- there should be nearly as many
steps in the final algorithm as there are lines in the final program. Your design will be compared to your
program.
BASIC EXAMPLE: The input and output should be carefully formatted. The final height should be in inches. Make it look exactly like the following at first:
Enter Height in Centimeters : 190
Enter Weight in Kilograms : 90
Height in the English system is: 75"
Weight in the English system is: 198
The above
output is worth 15 out of 20 points. Notice
how all the colons, input and output values line up? This is part of the requirements.
FULL CREDIT: For 5 more
points, the input and output should be more carefully formatted. The final height should not be just in
inches, but in rounded off feet and inches.
Sample run:
Enter Height in Centimeters : 190
Enter Weight in Kilograms : 90
Height in the English system is: 6' 3"
Weight in the English system is: 198
WHAT TO HAND IN: You must hand in your program (with
the outline form design at the top) and sample test runs on paper.