Question: pg 2 using c programming language. please include comments I have already started but want to receive further clarification on my logic. Arrays & Pointers/

 pg 2 using c programming language. please include comments I have

pg 2

already started but want to receive further clarification on my logic. Arrays

using c programming language. please include comments I have already started but want to receive further clarification on my logic.

Arrays & Pointers/ 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-mid-grade, and 4-premium) Number of gallons of gas (eg, 1675) Response for car wash (Y-Yes, N-No) Write the following functions: displayMenu) Will display a "Welcome" message and a menu of choices for gas. getinfol Asks the user for their choice of gas, number of gallons and whether or not they want a car wash. You may not use global variables! (Hint: Use pointers to "return" the various values) getGasRate) Will accept the type of gas and the gasprices array as a pointer and return the per gallon rate. Use pointer notation. getWashRate() Will accept the type of gas and the washprices array as a pointer and return the wash rate. Use pointer notation. calcAmount0 Will accept the gas rate, gallons, wash rate and return a total amount. Give the customer a $1.00 discount on a car wash if he buys at least 10 gallons. Use the printf to print out each customer's gas and car wash charge and individual total main) You must create two parallel arrays to start, one for the gas rate and one for the car wash rate. The car wash rate is determined by the type of gas that the customer has selected

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!