Question: Please use 2019 Visual Studio Program C, thank you. Intro to Programming in C-program 4 (larger program) Assignment purpose: To compile, build, and execute an

 Please use 2019 Visual Studio Program C, thank you. Intro toProgramming in C-program 4 (larger program) Assignment purpose: To compile, build, and

Please use 2019 Visual Studio Program C, thank you.

Intro to Programming in C-program 4 (larger program) Assignment purpose: To compile, build, and execute an interactive program using functions from stdio.h (printf and scanf), simple math in C, conditions, a simple while loop, and programmer defined functions. #define _CRT_SECURE_NO_WARNINGS //for Visual studio compiler #pragma warning(disable:6031) //ignore scanf warnings #include //for printf and scanf Instructions: For this assignment you will be implementing a program that simulates an online gas purchasing app. The program will welcome the user with a friendly message and instructions. Initialize the balance in the account of the user to $0.00 Display the balance Display the types of gas available The user will make the selection based on the item number of the gas type Ask and get the number of gallons Calculate the total The user will need to continue to add money until they have enough to make the purchase The program will end after the user makes the purchase . . Use the following programmer defined functions. DO NOT modify the Functions: //function prototypes void Greeting(void); 1/welcome the user to the gas purchasing app int DisplayGas Selections(); //display the gas choices and related item number 1/declare, ask, get, and return the item number double GallonPrice(int itemNumber); //input: item number //returns the price per gallon of the selected type of fuel double CheckForEnoughMoney (double accountBalance, double total); //input: amount of money in the account and the transaction total //gets money from the user until the user has enough to make the purchase //make the purchase and returns the remaining balance double AddMoney (double accountBalance); //input: amount of money in the account //displays the amount of money available in the account //allows the user to add money to the account //returns the updated balance after the money has been added void DisplayBalance (double accountBalance); //input: amount of money in the account //displays the amount of money available in the account Sample Output: Welcome to the gas purchasing app We offer fast service for you to select the grade of gas and number of gallons You will be presented with a list of available fuel options Please select the number for the item you wish to purchase. If you do not have enough money to cover the purchase, you will be asked to add money to your account until you have enough to make the purchase. You have $0.00 available in your account Here are the gas options (select the fuel option by entering the item number): 1. Regular $2.35 per gallon 2. Midgrade $2.69 per gallon 3. Premium $2.99 per gallon 4. Diesel $2.60 per gallon 5. E85 $2.09 per gallon Enter your selection (1-5):3 How many gallons of gas do you need? 16 The total is $47.84 and you have $0.00 in your account Enter the amount to add: 20.00 The total is $47.84 and you have $20.00 in your account Enter the amount to add: 20.00 The total is $47.84 and you have $40.00 in your account Enter the amount to add: 15.25 The total is $47.84 and you have $55.25 in your account You are now purchasing the gasoline ... Enter any character to see your remaining balance: t You have $7.41 available in your account Thank you for purchasing gas using this app! Have a great day

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!