Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:00, ariyanna029
What is added to the < meta > tag to describe the encoding type?
Answers: 2
image
Computers and Technology, 23.06.2019 04:31, hargunk329
Q13 what function does a security certificate perform? a. creates user accounts b. scrambles data c. identifies users d. creates password policies e. provides file access
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, kreshnikolloma
You wanted to look up information about alzheimer's, but you were unsure if it was spelled "alsheimer's" or "alzheimer's." which advanced search strategy would be useful? a) a boolean search b) using a wild card in your search c) trying different search engines d) doing a search for "alsheimer's not alzheimer's" asap. ill give brainlist.
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, jason9394
Facial expressions and gestures are examples of messages.
Answers: 3
Do you know the correct answer?
There are several different methods for measuring volume. For instance, you can measure volume in cm...

Questions in other subjects:

Konu
Mathematics, 20.09.2019 00:40