Question: Write a program that will read in a weight in kilograms and outputs the equivalent weight in pounds and ounces. Express the pounds as an

Write a program that will read in a weight in kilograms and outputs the equivalent weight in pounds and ounces. Express the pounds as an integer and ounces to the nearest 1/100 of an ounce. You have to write and use a function that uses the following function prototype to perform the calculations:
          - void KgtoLbOz(double kg, int& lbs, double& oz);
The funtion should not input any data or print any results. It should only do the calculation. Include a loop that lets the user repeat the computation for any new input values until the user decides they want to end the program.
 NOTE: There are 2.2046 pounds in a kilogram and 16 ounces in a pound.

Example Output: Enter the weight of the object in kilograms: 16.5315 The weight of the object is 36 pounds, 

Example Output: Enter the weight of the object in kilograms: 16.5315 The weight of the object is 36 pounds, 7.13 ounces. Would you like to run the program again (Y or N) ? Y Enter the weight of the object in kilograms: 0.876 The weight of the object is 1 pound, 14.90 ounces. Would you like to run the program again (Y or N) ? n Required Test Cases: 12.2 0.654 97.0 Skills: Var Con I/O Format Logic Loops Functions Call by Ref oFile I/O Arrays Strings GM

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The simple C program that fulfills the requirements include include void KgtoLbOzdouble kg int lbs d... View full answer

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 Computer Network Questions!