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 08:00
Someone with this coz i don’t really know what i can choose, just pick whatever u want. homework - you need to choose a website that you like or use frequently. you must visit the website and discuss 6 different features/parts/aspects of the website that you think makes it good. (100 words)
Answers: 2
question
Computers and Technology, 22.06.2019 15:00
When designing content as part of your content marketing strategy, what does the "think" stage represent in the "see, think, do, care" framework?
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
List the five on-board vehicle subsystems
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
You know the right answer?
There are several different methods for measuring volume. For instance, you can measure volume in cm...
Questions
question
Mathematics, 07.05.2020 05:03
question
Chemistry, 07.05.2020 05:03
Questions on the website: 13722363