Question: C Project 4. Write a program jar.c. Use an enumerated variable jar_type to indicate the types of jar available in the store. Jar Type Amount

C Project

4. Write a program jar.c. Use an enumerated variable jar_type to indicate the types of jar available in the store.

Jar Type

Amount of liquid in ml

Cup

236.588

Pint

473.176

Quart

946.353

Half Gallon

1892.705

Full Gallon

3785.41

Use the scanf statement to get the jar type and the # of jars to be purchased from the user.

Convert the amount of liquid that the purchased jars could hold to milliliters and display it on the terminal using the above table. Use a switch case construct. Make sure that the output display follow the same format of the sample output given below.

Sample Output:

Enter the type of jar to be purchased as a number (I. e) 1-cup, 2-Pint, 3-Quart, 4-Half Gallon, 5- Gallon: 1

Enter the number of jars to be purchased: 4

Total amount of liquid in ml: 946.352

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!