How many centimeters do you want to convert


Assignment

Write a program that converts centimeters to yards, feet, and inches. There are 2.54 centimeters in an inch. You can solve this problem by doing division, multiplication, addition, and subtraction. Converting a float to an int at the appropriate time will help in solving this problem. When you run the program it should look exactly like this (except possibly for decimal places in the inches):

How many centimeters do you want to convert? 127.25

This is 1 yard, 1~foot, 2.098425 inches.

This is a modification of the program in exercise 5. In this version of it you should print "yard" when there is one yard, and "yards" when there is more than one yard. If there are zero yards then it should not print "yard" or "yards". The same thing applies to "feet". Use an if statement to determine the label to print and if the label should be printed at all.

The response should include a reference list. Double-space, using Times New Roman 12 pnt font, one-inch margins, and APA style of writing and citations.

Solution Preview :

Prepared by a verified Expert
Programming Languages: How many centimeters do you want to convert
Reference No:- TGS02974261

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)