Problem Statement Interest on Credit card accounts can be quite high. Most credit card companies compute interest on an average daily balance. Here is an algorithm for computing the average daily balance and the monthly interest charge on a credit. Steps: Step 1 - Multiply the net balance shown on the statement by the number of days in the billing cycle. Step 2 - Multiply the net payment received by the number of days the payment was received before the statement date. Step 3 - Subtract the result of the calculation in step 2 from the result of the calculation in step 1. Step 4 - Divide the result of step 3 by the number of days in the billing cycle. This value is the average daily balance. Step 5 - Compute the interest charge for the billing period by multiplying the average daily balance by the monthly interest rate. Specific Example: Here is an example to illustrate the algorithm. Suppose a credit card statement showed a previous balance of $850. Eleven days before the end of the billing cycle, a payment of $400 is made. The billing cycle for the month is 31 days, and the monthly interest rate is 1.32%. The calculation of the interest charge is as follows. Step 1: $850 * 31 = $26,350 Step 2: $400 * 11 = $4,400 Step 3: $26,350 - $4,400 = $21,950 Step 4: $21,950 / 31 = $708.06 Step 5: $708.06 * 0.0132 = $9.34 A l g o r i t h m Write a program that computes the monthly interest charge on a credit card account. Your program should acquire as input the previous balance, the payment amount, the number of days in the billing cycle, the day of the billing cycle the payment was made, and the monthly interest rate

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 30PE
icon
Related questions
Question

C++ program

E x e r c i s e 3
Problem Statement
Interest on Credit card accounts can be quite high. Most credit card companies compute interest
on an average daily balance. Here is an algorithm for computing the average daily balance and
the monthly interest charge on a credit.
Steps:
Step 1 - Multiply the net balance shown on the statement by the number of days in the billing
cycle.
Step 2 - Multiply the net payment received by the number of days the payment was received
before the statement date.
Step 3 - Subtract the result of the calculation in step 2 from the result of the calculation in step 1.
Step 4 - Divide the result of step 3 by the number of days in the billing cycle. This value is the
average daily balance.
Step 5 - Compute the interest charge for the billing period by multiplying the average daily
balance by the monthly interest rate.
Specific Example:
Here is an example to illustrate the algorithm. Suppose a credit card statement showed a previous
balance of $850. Eleven days before the end of the billing cycle, a payment of $400 is made. The
billing cycle for the month is 31 days, and the monthly interest rate is 1.32%. The calculation of
the interest charge is as follows.
Step 1: $850 * 31 = $26,350
Step 2: $400 * 11 = $4,400
Step 3: $26,350 - $4,400 = $21,950
Step 4: $21,950 / 31 = $708.06
Step 5: $708.06 * 0.0132 = $9.34
A l g o r i t h m
Write a program that computes the monthly interest charge on a credit card account. Your
program should acquire as input the previous balance, the payment amount, the number of days
in the billing cycle, the day of the billing cycle the payment was made, and the monthly interest
rate

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Computational Systems
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr