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++ 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
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
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images