Question: How can I alter the code to show me a list of all the deposits I input into case 1? #include #include using namespace std;

How can I alter the code to show me a list of all the deposits I input into case 1?

#include #include

using namespace std;

int Deposit (int amount, int currentBalance); int Withdrawal (int amount, int currentBalance); void viewBalance (int currentBalance);

int main(int argc, char** argv) { //variables int currentBalance = 1000; // beginning balance for checking account int amount = 0; int answer = 0; bool notComplete = true; while (notComplete){ cout << "--Would you like to make a withdrawal, deposit or a view of balance-- "; cout << "Submit 1 for Deposit / 2 for withdrawal / 3 for view balance / 4 for end of session "; cin >> answer; switch (answer) {

case 1: cout << "Enter the deposit amount" <> amount; currentBalance = Deposit (amount, currentBalance); cout << "Your deposit is: " << amount << " " << endl; cout << "Your new balance is: " << currentBalance << " " <> amount; if (amount > currentBalance) { cout << "Insufficient funds "; break; } // end the withdrawal amount case 3: viewBalance(currentBalance); break; case 4: notComplete = false; break; default: cout << "Not a valid input"; break; }// end switch }// end while loop cout << " Thank you and and have a wonderful day! "; system ("pause"); return 0; }// end main

int Deposit (int amount, int currentBalance) { currentBalance +=amount; return currentBalance; }//end deposit

int Withdrawal(int amount, int currentBalance) { currentBalance -= amount; return currentBalance; }// end withdrawal

void viewBalance (int currentBalance)

{ cout <<" Your current balance is: " <

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!