#include //for printf and scanf #include //for tolower function //function prototypes void Greeting(); //welcome the user to the gas station app void ViewAndGetSelection(char* selectionPtr); //input: the user's selection (input/output parameter) //display the program options and get the users selection //use an input/output parameter for the selection void ProcessSelection(char selection, double* balancePtr); //input: the user's selection by copy (input parameter) //input: the account balance (input/output parameter) //display a message that the selection has been entered //display the balance when the user enters 'b' //allow the user to add money to the account when the user enters 'u' int main() { char choiceInMain; double balanceInMain = 0.00; //call the greeting function //view and get the selection - function call //change the selection to lower or upper case //make sure the user did not enter q to quit while (choiceInMain != 'q') { //process the selection //view and get the next selection //change the selection to lower or upper case } //say goodbye to the user // do not forget to return SUCCESS } //function definitions void Greeting() //welcome the user to the coffee shop { printf("Welcome to the fuel app\n"); printf("We offer convenient gas purchasing\n"); } void ViewAndGetSelection(char* selectionPtr) //input: the user's selection (input/output parameter) //display the program options and get the users selection //use an input/output parameter for the selection { } void ProcessSelection(char selection, double* balancePtr) //input: the user's selection by copy (input parameter) //input: the account balance (input/output parameter) //display a message that the selection has been entered //display the balance when the user enters 'b' //allow the user to add money to the account when the user enters 'u' { if (selection == 'g') { printf("\n----------------------------------\n"); printf("You selected %c\n", selection); printf("Here you will display the gas prices\n"); printf("----------------------------------\n"); } //add the rest of the conditions }
I need help making this C
#include<stdio.h> //for printf and scanf
#include<ctype.h> //for tolower function
//function prototypes
void Greeting();
//welcome the user to the gas station app
void ViewAndGetSelection(char* selectionPtr);
//input: the user's selection (input/output parameter)
//display the program options and get the users selection
//use an input/output parameter for the selection
void ProcessSelection(char selection, double* balancePtr);
//input: the user's selection by copy (input parameter)
//input: the account balance (input/output parameter)
//display a message that the selection has been entered
//display the balance when the user enters 'b'
//allow the user to add money to the account when the user enters 'u'
int main()
{
char choiceInMain;
double balanceInMain = 0.00;
//call the greeting function
//view and get the selection - function call
//change the selection to lower or upper case
//make sure the user did not enter q to quit
while (choiceInMain != 'q')
{
//process the selection
//view and get the next selection
//change the selection to lower or upper case
}
//say goodbye to the user
// do not forget to return SUCCESS
}
//function definitions
void Greeting()
//welcome the user to the coffee shop
{
printf("Welcome to the fuel app\n");
printf("We offer convenient gas purchasing\n");
}
void ViewAndGetSelection(char* selectionPtr)
//input: the user's selection (input/output parameter)
//display the program options and get the users selection
//use an input/output parameter for the selection
{
}
void ProcessSelection(char selection, double* balancePtr)
//input: the user's selection by copy (input parameter)
//input: the account balance (input/output parameter)
//display a message that the selection has been entered
//display the balance when the user enters 'b'
//allow the user to add money to the account when the user enters 'u'
{
if (selection == 'g')
{
printf("\n----------------------------------\n");
printf("You selected %c\n", selection);
printf("Here you will display the gas prices\n");
printf("----------------------------------\n");
}
//add the rest of the conditions
}
Trending now
This is a popular solution!
Step by step
Solved in 2 steps