Write a program that will read in a weight in kilograms and outputs the equivalent weight in
Fantastic news! We've Found the answer you've been seeking!
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 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.
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date: