Question: Write a C program with a main function and two subfunctions: oz2kg and kgout. Function oz2kg converts a mass from ounces to kilograms and
Write a C program with a main function and two subfunctions: oz2kg and kgout. Function oz2kg converts a mass from ounces to kilograms and function kgout prints the converted value in kilograms to the screen, respectively. In the main function, prompt the user to enter a mass in ounces, read the value, and call functions oz2kg and kgout. Use the pass by value scheme when passing arguments from the main function to each subfunction. At the top of your program, include a general comment that describes the overall purpose of the program (no more than a few words to a sentence). In each subfunction, include a comment that describes what the function does (using no more than a few words to a sentence). Conversion factor: 1 ounce 0.0283495 kilogram
Step by Step Solution
3.45 Rating (158 Votes )
There are 3 Steps involved in it
Explanation The program includes two subfunctions oz2kg to convert mass from ounces to ki... View full answer
Get step-by-step solutions from verified subject matter experts
