Question: Functions with reference parameters: Write a C++ program which includes two functions that calculate unit conversions between a distance expressed in feet and inches, and

 Functions with reference parameters: Write a C++ program which includes twofunctions that calculate unit conversions between a distance expressed in feet andinches, and in meters. The formulas for the unit conversions are: 1

Functions with reference parameters: Write a C++ program which includes two functions that calculate unit conversions between a distance expressed in feet and inches, and in meters. The formulas for the unit conversions are: 1 inch0.0254 meters 1 foot = 12 inches The program must meet the following requirements: uirements . Name the source file for your program program6.cpp Throughout the program: - A distance can only be positive or zero (i.e. can't be negative) - A distance in feet and inches will consist of a whole number of feet, and a number (that can include a fraction) of inches that is less than 12 - A distance in meters will be a number that can include a fraction Write the function bodies for the two functions listed below: // Converts meters to feet and inches, and sets the references parameters // feet and inches to the result void meters_to_feet_and_inches (double meters, int& feet, double& inches) // Converts feet and inches to meters and returns the result double feet and inches_to_meters(int feet, double inches) The function meters.to.feet and inches must only calculate the feet-and-inches value that is equivalent to its parameter meters, and set the values of its reference parameters to this calculated value The function feet andinches.to meters must only calculate and value of meters that is equivalent to the sum of its parameters feet and inches, and return this calculated value. In particular, these two functions must not contain any cin or cout statements. .In addition to the required functions listed above, you may use functions of your own design to organize your programn if you want

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!