Question: PLEASE USE THE FOLLOWING PROGRAM DEFINE FUNCTIONS. DO NOT MODIFY THE FUNCTIONS PLEASE. PLEASE USE 2019 VISUAL STUDIOS PROGRAMMING IN C. THANK YOU. #define _CRT_SECURE_NO_WARNINGS
PLEASE USE THE FOLLOWING PROGRAM DEFINE FUNCTIONS. DO NOT MODIFY THE FUNCTIONS PLEASE.
PLEASE USE 2019 VISUAL STUDIOS PROGRAMMING IN C.
THANK YOU.
#define _CRT_SECURE_NO_WARNINGS //for Visual studio compiler
#pragma warning(disable:6031) //ignore scanf warnings#include //for printf and scanf
//function prototypes
void Greeting(void);
//welcome the user to the gas purchasing app
int DisplayGasSelections();
//display the gas choices and related item number
//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
int main()
{
//declare variables here
//greet the user - Greeting function call
//display the account balance - DisplayBalance function call
//get the item number - DisplayGasSelections function call
//get the price per gallon - GallonPrice function call
//ask and get the number of gallons
//calculate the total//check if there is enough money - CheckForEnoughMoney function call
//ask and get an integer from the user when they are ready to see the remaining balance
//display remaining account balance
//thank the user
//say goodbye to the user
printf(" Have a great day! ");
// do not forget to return SUCCESS
// type your command here...
}
//function definitions
void Greeting(void)
//welcome the user to the gas purchasing app
{
}
int DisplayGasSelections()
//display the gas choices and related item number
//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
{
while (accountBalance
{
accountBalance = AddMoney(accountBalance);
printf(" -------------------------------------------------------");
printf(" The total is $%.2f and you have $%.2f in your account ", total, accountBalance);
}
//make the transaction
//return the accountBalance
{
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
{
//return the accountBalance
}
void DisplayBalance(double accountBalance)
//input: amount of money in the account
//displays the amount of money available in the account
{
}


#define _CRT_SECURE_NO_WARNINGS //for Visual studio compiler #pragma warning(disable:6831) //ignore scanf warnings #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
