Question: IN C++ please! Only using for loops and basic C++ WARNING: You MUST use do-while loop to complete this exercise to receive points! Write a

IN C++ please! Only using for loops and basic C++

WARNING: You MUST use do-while loop to complete this exercise to receive points!

Write a program to simulate a simple ATM machine. The program will print to screen the initial account balance and ask the user how much they wish to withdraw, like this:

Your account balance is:  Enter amount to withdraw: 

Remove the amount from the account balance and repeat until the request to withdraw results in a negative (less than 0) amount. If the user tries to withdraw more than the account allows, print the final message:

Insufficient funds. 

And end the program.

All numbers should be printed with double digit precision. The starting balance is 500.

Sample run (includes input):

Your account balance is: 500.00 Enter amount to withdraw: 250 Your account balance is: 250.00 Enter amount to withdraw: 400 Insufficient funds. 

Any attempt to hard code answers will result in a 0 for the exercise.

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!