Question: Please come up with an algorithm for the following: Write it in a logical order Use the following programmer defined functions. DO NOT modify the

Use the following programmer defined functions. DO NOT modify the Functions: //function prototypes - DO NOT MODIFY THE FUNCTIONS //greets the user void Greeting(); // Input/output : one character by reference // displays and gets the menu choice: ('D', ' W ', ' Q ') void RunMenu(char* choicePtr); //Input/output : two doubles by reference //Input : one character by value(copy) //Processes the selection void ProcessSelection(char choice, double* checkPtr, double* savPtr); //SAME AS PROGRAM 4 //Input: one double and one character both by value(copy) //displays the balance of the account (' C ', checking or ' S ', savings) void DisplayBalance(double accountBalance, char account); // Input/output : one double by reference //declare, ask, and get the amount from the user and add it to the account void DepositMoney (double* balancePtr); // Input/output : one double by reference // declare, ask, and get the amount from the user and subtract it from the account void WithDrawMoney(double* balancePtr); //Input: 2 doubles by value (copy) //returns a 1 if the balance is >= subtractAmount //prints "not enough" message and returns if balance =100.00; double savingsBalance =200.00; FlLe" outPtr: FlLe inPtr, //creating the file and "write" the initial balances outPtr = fopen("balancesinput.txt", "w"); fprintf(outPtr, "\%fn", checkingBalance); fprintf(outPtr, "\%fn", savingsBalance); //Open the file and "read" the balances inPtr = fopen("balancesinput txt", "r"); fscanf(inPtr, "\%lf", \&checkingBalance); fscanf(inPtr, "\%lf", \&savingsBalance); //the rest of the main function code and while loop //save the new balances to the file at the end, right before retum 0 printf("InSaving to the fileln"); fprintf(outPtr, "\%fln", checkingBalance); fprintf(outPtr, "\%fun", savingsBalance); return 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
