Question: I'm working in c++ creating a simple banking program. The user enters their account balance, then enters an action such as withdraw (W) deposit (D)

I'm working in c++ creating a simple banking program. The user enters their account balance, then enters an action such as withdraw (W) deposit (D) interest (I) or close (C) and then they enter the amount they want to process. I'm new to programming so i was wondering...

a) how do create a input (cin) that accepts multiple inputs from the user? (The user can choose to withdraw (W) or they can choose to deposit (D)... see the image below, i defined W, D, I and C as char's and then on line 33 i ask the user to choose an action but i don't think my cin (line 34) is set up correctly...

b) The project requires different rules for each action (W, D, I or C), for example the user is NOT allowed to withdraw more than 500 but they ARE allowed to deposit more than 500. How do i set up IF statements that apply to certain actions but not others?

I've only been taking c++ for a few weeks so i can't use advanced techniques.... thanks!

I'm working in c++ creating a simple banking program. The user enters

18 #include 19 20 21 22 int main() 23 f 24 cout L#include using namespace std; char D, W, I, C; 33 cin> operand1; 34, cout

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!