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 nowThis is a popular solution!
Step by stepSolved in 2 steps
- C programing Given the function below, what would the function call question3(10, 101) return? int question3(int a, int b) {if (a == 0) return b;if (b == 0) return a;return question3(10*a+b%10, b/10);}arrow_forwardA header of a C-language function is: void recurs(int current_level, int max_level ) The keyword "void" here signifiesarrow_forwardC++ Programmingarrow_forward
- Programming Language: C++ 4. Select the two correct statements about stub functions: Select one or more: a. stubs are used to test the functionality of a program b. stubs must return a value c. stubs are programs that test if a called function returns the correct result d. stubs are simpler than the functions they replacearrow_forwardUsing C++ Language Write a function call with arguments tensPlace, onesPlace, and userInt. Be sure to pass the first two arguments as pointers. Sample output for the given program: tensPlace = 4, onesPlace = 1 Code: #include <stdio.h> void SplitIntoTensOnes(int* tensDigit, int* onesDigit, int DecVal){ *tensDigit = (DecVal / 10) % 10; *onesDigit = DecVal % 10;} int main(void) { int tensPlace; int onesPlace; int userInt; scanf("%d", &userInt); /* Your solution goes here */ printf("tensPlace = %d, onesPlace = %d\n", tensPlace, onesPlace); return 0;}arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education