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, 22.06.2019 20:00
What is the term for water wave that is created by an underwater earthquake
Answers: 1
question
Computers and Technology, 23.06.2019 21:20
In microsoft word, when you highlight existing text you want to replace, you're in              a.  advanced mode.    b.  automatic mode.    c.  basic mode.    d.  typeover mode
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
What are "open-loop" and "closed-loop" systems
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
How do i get rid of my member ship for
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, 21.02.2021 02:50
question
Mathematics, 21.02.2021 02:50
question
Social Studies, 21.02.2021 02:50
Questions on the website: 13722362