subject

There are several different methods for measuring volume. For instance, you can measure volume in cm3, liters, quarts, and gallons. You could write several functions to compute back and forth between these four scales. However, for this exercise, you will write a single function to convert a single value from any of the four scales to any of the other four scales. To support this, you will need to define an enumerated type called Volume that enumerates the following four scales: CM, LITER, QUART, GALLON. You will then use this enumerated type and implement the following function: int convert Volume(double *cm, double 'liter, double *quart, double "gallon, Volume scale): Place your enum declaration and the prototype declaration in a file called hw04p5.h
Place your actual function implementation in a file called hw04p5.c
Create a main function in volumeDemo. c that prompts the user for one of the scales and a value to convert and outputs the result, of all four scales (Just use this to test your function, do not hand it in.)
Look online for a volume conversion table
The return value will be a flag indicating an error-level: 0 for no error, 1 for an error (negative values), and 2 for a NULL pointer error.
Define an enumerated type named Error to implement, this.
Enter a volume: 257.50
Enter scale (G, C, L, Q): L
Conversion:
257.50 Liters
68.02 Gallons
257500 Cubic Centimeters
272.10 Quarts
Please write the code using c programming.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
How can the temperature of a room be raised by 5degreesf?
Answers: 1
question
Computers and Technology, 24.06.2019 03:00
Will do anything for brainlest so can you guys me out i will try my best to you out
Answers: 1
question
Computers and Technology, 25.06.2019 01:30
Ashort circuit locator should be periodically run along the cords used in a shop to check for shorts and open circuits. a.)true b.)false
Answers: 2
You know the right answer?
There are several different methods for measuring volume. For instance, you can measure volume in cm...
Questions
question
Mathematics, 19.11.2019 09:31
question
Mathematics, 19.11.2019 09:31
Questions on the website: 13722362