MINDTAP COMPUTING FOR MALIK'S C++ PROGR
MINDTAP COMPUTING FOR MALIK'S C++ PROGR
8th Edition
ISBN: 9781337696142
Author: Malik
Publisher: CENGAGE LEARNING - CONSIGNMENT
bartleby

Concept explainers

Expert Solution & Answer
Book Icon
Chapter 1, Problem 20SA

Explanation of Solution

Algorithm:

  1. Get balance, the amount in the account of the user.

  2. Prompt the user to enter the amount to be withdrawn amount.

  3. Determine if the amount withdrawal is allowed using the following formula and store the result in allowed:

    If (amount is more than 500 or balance is zero or balance is negative)

          Print “You are not allowed to withdraw more than $500 per day“

       allowed = false

    otherwise

            allowed = true

  4. deduction = 0 (suppose deduction is the amount by which the account balance will be finally deducted)

  5. Calculate serviceCharge and deduction using the following formula:

     If (allowed is equal to true)

        If (balance < amount)

        Print "Insufficient balance, withdrawal with service charge of $25.00"

         Get choice to withdraw

            if (choice is Yes)

               serviceCharge = 25...

Blurred answer
Students have asked these similar questions
An ATM allows a customer to withdraw a maximum of $500 per day. If a customer withdraws more than $300, the service charge is 4% of the amount over $300. 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 $25.00. If there is no money in the account or if the account balance is negative, the ATM does not allow the customer to withdraw the money. If the amount to be withdrawn is greater than $500, the ATM informs the customer about the maximum amount that can be withdrawn and does not allow them to withdraw the money. Write an algorithm that allows the customer to enter the amount to be withdrawn. The algorithm then checks the total amount in the account, dispenses the money to the customer, and debits the account by the amount withdrawn and the service charges, if any.
An ATM allows a customer to withdraw a maximum of $500 per day. If a customer withdraws more than $300, the service charge is 4% of the amount over $300. 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 $25.00. If there is no money in the account or if the account balance is negative, the ATM does not allow the customer to withdraw any money. If the amount to be withdrawn is greater than $500, the ATM informs the customer about the maximum amount that can be withdrawn. Write an algorithm that allows the customer to enter the amount to be withdrawn. The algorithm then checks the total amount in the account, dispenses the money to the customer, and debits the account by the amount withdrawn and the service charges, if any. (9) Submit your answer to dropbox.
An ATM allows a customer to withdraw a maximum of $500 per day. If a customer withdraws more than $300, the service charge is 4% of the amount over $300. If the customer does not have sufficient money in the account, the ATM informs the customer about the insufficient fund and gives the option to withdraw the money for a service charge of $25.00. If there is no money in the account or if the account balance is negative, the ATM does not allow the customer to withdraw any money. If the amount to be withdrawn is greater than $500, the ATM informs the customer about the maximum amount that can be withdrawn. Write an algorithm that allows the customer to enter the amount to be withdrawn. The algorithm then checks the total amount in the account, dispenses the money to the customer, and debits the account   by the amount withdrawn and the service charges, if any.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage