Question: I need this centimeter conversion program to round up to the nearest inch. #include 2 using namespace std; 4 51 const double CENTIMETERS PER INCH

I need this centimeter conversion program to round up to the nearest inch.

I need this centimeter conversion program to round up to the nearest

#include 2 using namespace std; 4 51 const double CENTIMETERS PER INCH = 2.54; 6 const int INCHES PER FOOT 12, INCHES PER YARD 36 7 Eint main () 9 10 double centimeters; int inches, feet, yards, totalInches; 12 13 14 15 16 17 18 19 20 21 cout > centimeters; total1nches = centimeters / CENTIMETERS PER.INCH; //converts centimeters to inches yards = total1nches / INCHES PER YARD; //converts total Inches to yards feet = (totalInches- (INCHES. PER-YARD * yards)) / 12; //converts inches to feet inches = (tota!Inches % (INCHES PER YARD * yards)) - INCHES PER FOOT ; //calculates inches 23 24 25 26 27 28 29 30 31 32 cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!