logo CodeStepByStep logo

InchesToCentimeters

Write an interactive console program in a class named InchesToCentimeters that prompts the user to read in two input values: a number of feet, followed on a separate line by a number of inches. The program should convert this amount to centimeters, rounded to the nearest tenth. Here is a sample run of the program (user input is shown like this):

This program converts feet and inches to centimeters.
Enter number of feet: 5
Enter number of inches: 11
5ft 11in = 180.34cm
Type your C# solution code here:


This exercise asks for a complete program. This should essentially be contents you could put into a file and run outside of CodeStepByStep.

You must log in before you can solve this problem.

Log In

Need help?

If you do not understand how to solve an exercise or why your solution doesn't work, please contact your TA or instructor.
If something seems wrong with the site (errors, slow performance, incorrect tests, etc.), please

Is there a problem? Contact a site administrator.

©, all rights reserved.