Question: write the program in C Name Date: Arrays Gas and Car Wash Program The program determines the charges for purchasing gasoline and a possible car


write the program in C
Name Date: Arrays Gas and Car Wash Program The program determines the charges for purchasing gasoline and a possible car wash. our company has 4 gasoline rates, for economy, regular, mid-grade, and premium gas. The program will read data for each customer as follows: Type of gas (1 economy, 2 regular, 3 d-grade, and 4 premium Number of gallons of gas (e.g. 16.75) Response for car wash (Y Yes, NaNo) Write the following functions: displayMenu() Will display a "Welcome" message and a menu of choices for gas. get Gas Type() Asks the user for their choice of gas and returns that value. get Gallons Asks the user for the number of gallons they would like and returns that value. get Carwash() Asks the user whether or not they want a car wash and return that value. get Gas Rate() Will accept the type of gas and the gasprices array as parameters and return the per gallon rate. getWashRate() Will accept the type of gas and the washprices array as parameters and return the wash rate. calcAmount0 Will accept the gas rate, gallons, wash rate as parameters and return a total amount. Give the customer a $1.00 discount on a car wash if he buys at least 10 gallons. Print the customer's gas and car wash charge and their total
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
