# Answered! An ATM allows a customer to withdraw a maximum of \$400. If the customer withdraws more than \$200, the service…

An ATM allows a customer to withdraw a maximum of \$400. If the customer withdraws more than \$200, the service charge is 3% of the only the amount over \$200. If the customer does not have sufficient money in the account, the ATM informs the customer about the insufficient funds and gives the customer the option to withdraw the money for a service charge of \$30. If there is no money in the account or if the account balance is negative, the ATM does now allow the customer to withdraw any money. If the amount requested is greater than \$400, he ATM informs the customer about the maximum that can be withdrawn and asks for them to enter a new amount. Write an algorithm that allows the customer to enter the amount to be withdrawn. The algorithm them checks the total amount in the account for more than \$0 or requested amount over \$400, checks for possible fees, dispenses the money to the customer, and debits the amount withdrawn and the service charges, if any. Note that the amount withdrawn can result in a negative balance. Do not attempt to handle that in this algorithm. Write this in algorithm format not program code format.

//algorithm for ATM money withdrawal

Don't use plagiarized sources. Get Your Custom Essay on
Answered! An ATM allows a customer to withdraw a maximum of \$400. If the customer withdraws more than \$200, the service…
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS \$13/PAGE

Algorithm: Algorithm for cash withdrawals from ATM.
Input: withdraw_amount
Output: amount+service_charges.

Algorithm:

step1:
balance =account balance.
withdraw_amount = (Get input from user)

step 2:
if(withdraw_amount>400)
then, print “maximum limit exceeds”

step 3:
if(withdraw_amout<1)
then, print “enter a valid amount”

step 4:
if(withdraw_amount>balance)
then, print “insufficient balance.. withdraw money \$30 as service charges ”

step 5:
if(withdraw_amount<400 && withdraw_amount<balance)
if(withdraw_amount>200)
service_charge=withdraw_amount*(3/100)
print ” Your cash is dispensed… total amount withdrawn +service_charges 30% (withdraw_amount +service_charge) ”

else
print “your case is dispensed ”