Question: This is an example of a function where you do not pass any parameters to the function and nothing is returned to the calling function.
This is an example of a function where you do not pass any parameters to the function and nothing is returned to the calling function. (the function returns void)
Write a C function that will :
1. in the function, ask the user for a number of gallons
- convert a given number of gallons into quarts, liters, cups, and fluid ounce.
- print out the answer in the function
- the output should look like:
??? gallons is:
??? quarts
??? liters
??? cups
??? fluid ounces
function header should be void convertGallons()
in main
- call your function
- the output should look like:
??? gallons is:
??? quarts
??? liters
??? cups
??? fluid ounces
Use the output (cout) manipulators to format the output correctly [setw(?), fixed, right, left, etc]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
