Answered You can hire a professional tutor to get the answer.

QUESTION

Need help in writing a C program where You will make an ATM menu specified below 1) Check balance 2) Make a Deposit 3) Make a Withdrawal 4) Change

Need help in writing a C program where

 You will make an ATM menu specified below

1) Check balance 2) Make a Deposit 3) Make a Withdrawal 4) Change Password 5) Exit Please write number from 1 to 5 to select a menu item:

When a number is input by the user, you will print the string corresponding to the number and execute the task as shown below in the list. The underlined entity is the user input for each choice in the menu.

User entered 1 Execute Check balance Balance is $ 153.80

User entered 2 Execute Make a Deposit Enter amount to deposit: 54.77 New Balance is $ 208.57

User entered 3 Execute Make a Withdrawal Enter amount to withdraw: 40.00 New Balance is $ 168.57

User entered 4 Execute Change Password Enter new password: 99999999 New Password is "99999999"

User entered 5 Execute Exit Terminating program Have a nice day!

If the input number is 5, your program should terminate as shown above. Otherwise, after every transaction is completed you would print a new line

Press any key to continue your transactions ... 

Your program will wait until user presses any key on the keyboard. After a key is pressed, your program will display the menu as above and repeat the process above. Note in the process above, when a number is not in 1 to 5, you will ignore the input.

You will use getchar() to consume and putchar() to print the character entered by the user is a standard I/O (input/output) function with the following specification (slightly modified from its original specification)

Internally you will create the following variables and any others to hold needed information.

1) MyAccount-Store a float number 2) Initialize MyAccount to 1000.00 as initial balance 3) Password - Store an integer of length 8 digits 4) Initialize Password to 12345678 5) Char variable/s to hold user input and key press. 6) When 1) is pressed you will display contents of MyAccount 7) Deposit increments MyAccount 8) Withdrawal decrements MyAccount 9) When 5 is pressed you must exit cleanly from the Program

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question