c++ Interest on a credit card’s unpaid balance is calculated using the average daily balance. Suppose that netBa

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 3RP
icon
Related questions
Question

c++

Interest on a credit card’s unpaid balance is calculated using the average daily balance.

Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle.

Then, the average daily balance is:

averageDailyBalance = (netBalance  

M myMCC | Middlesex College -
O Programming Exercise 3-7
* MindTap - Cengage Learning x
C Chegg Search
> Bing
A ng.cengage.com/static/nb/ui/evo/index.html?deploymentld=5781122319546088747421251303&elSBN=9781337274715&snapshotld=2618406&id=1306226479&takel. E
* CENGAGE MINDTAP
Q Search this course
Mohammad v
Programming Exercise 3-7
Tasks
main.cpp
+
>- Terminal
6 {
7 double dl,d2, netBalance;
8 double payment, averageDailyBalance = 0,
9 interest = 0,interestRate;
/usr/include/c++/7/bits/stl_ite
Correct interest output
rator.h:346:5: note:
template
A-Z
argument deduction/substitutio
n failed:
main.cpp:25:15: note:
stream {aka std::basic_ostream<
char>}' is not derived from 'co
0.00
out of
10,00
10 cout<<"Enter the NetBalance: ";
'std::0
O out of 2 checks passed. Review the
11 cin>>netBalance;
results below for more details.
12 cout<<"Enter the Payment: ";
13 cin>>payment;
nst std::reverse_iterator<_Iter
14 cout<<"Enter dl:";
ator>'
Checks
system("pause");
15 cin>>dl;
16 cout<<"Enter d2:";
17 cin>>d2;
Test Case • Incomplete
<>
In file included from /usr/incl
ude/c++/7/bits/stl_algobase.h:6
Correct interest output test 1
18 cout<<"Enter intrest rate per month:";
7:0,
19 cin>>interestRate;
from /usr/incl
ude/c++/7/bits/char_traits.h:39
Test Case • Incomplete
<>
20 averageDailyBalance = (netBalance * dl -payment*d2)/d1;
Correct interest output test 2
21 interest=averageDailyBalance*interestRate;
22 cout<<"The interest rate is:" <<fixed <<
23 showpoint;
from /usr/incl
ude/c++/7/ios:40,
24 cout<
from /usr/incl
25 system("pause");
ude/c++/7/ostream:38,
26
from /usr/incl
27
ude/c++/7/iostream:39,
Run checks
A Submit 0%
2:01 PM
N
11/21/2021
Transcribed Image Text:M myMCC | Middlesex College - O Programming Exercise 3-7 * MindTap - Cengage Learning x C Chegg Search > Bing A ng.cengage.com/static/nb/ui/evo/index.html?deploymentld=5781122319546088747421251303&elSBN=9781337274715&snapshotld=2618406&id=1306226479&takel. E * CENGAGE MINDTAP Q Search this course Mohammad v Programming Exercise 3-7 Tasks main.cpp + >- Terminal 6 { 7 double dl,d2, netBalance; 8 double payment, averageDailyBalance = 0, 9 interest = 0,interestRate; /usr/include/c++/7/bits/stl_ite Correct interest output rator.h:346:5: note: template A-Z argument deduction/substitutio n failed: main.cpp:25:15: note: stream {aka std::basic_ostream< char>}' is not derived from 'co 0.00 out of 10,00 10 cout<<"Enter the NetBalance: "; 'std::0 O out of 2 checks passed. Review the 11 cin>>netBalance; results below for more details. 12 cout<<"Enter the Payment: "; 13 cin>>payment; nst std::reverse_iterator<_Iter 14 cout<<"Enter dl:"; ator>' Checks system("pause"); 15 cin>>dl; 16 cout<<"Enter d2:"; 17 cin>>d2; Test Case • Incomplete <> In file included from /usr/incl ude/c++/7/bits/stl_algobase.h:6 Correct interest output test 1 18 cout<<"Enter intrest rate per month:"; 7:0, 19 cin>>interestRate; from /usr/incl ude/c++/7/bits/char_traits.h:39 Test Case • Incomplete <> 20 averageDailyBalance = (netBalance * dl -payment*d2)/d1; Correct interest output test 2 21 interest=averageDailyBalance*interestRate; 22 cout<<"The interest rate is:" <<fixed << 23 showpoint; from /usr/incl ude/c++/7/ios:40, 24 cout< from /usr/incl 25 system("pause"); ude/c++/7/ostream:38, 26 from /usr/incl 27 ude/c++/7/iostream:39, Run checks A Submit 0% 2:01 PM N 11/21/2021
M myMCC | Middlesex College -
O Programming Exercise 3-7
* MindTap - Cengage Learning x
C Chegg Search
> Bing
A ng.cengage.com/static/nb/ui/evo/index.html?deploymentld=5781122319546088747421251303&elSBN=9781337274715&snapshotld=2618406&id=1306226479&takel. E
* CENGAGE MINDTAP
Q Search this course
Mohammad v
Programming Exercise 3-7
Instructions
main.cpp
>- Terminal
1 #include <iostream>
/usr/include/c++/7/bits/stl_ite
Summary
rator.h:346:5: note:
template
3 using namespace std;
A-Z
argument deduction/substitutio
n failed:
main.cpp:25:15: note:
stream {aka std::basic_ostream<
char>}' is not derived from 'co
4
Interest on a credit card's unpaid balance is
5 int main()
'std::0
calculated using the average daily balance.
7 double dl,d2,netBalance;
8 double payment, averageDailyBalance = 0,
9 interest = 0,interestRate;
Suppose that netBalance is the balance
nst std::reverse_iterator<_Iter
ator>'
shown in the bill, payment is the payment
10 cout<<"Enter the NetBalance: ";
system("pause");
made, d1 is the number of days in the
11 cin>>netBalance;
In file included from /usr/incl
ude/c++/7/bits/stl_algobase.h:6
billing cycle, and d2 is the number of days
12 cout<<"Enter the Payment:
";
payment is made before billing cycle.
13 cin>>payment;
14 cout<<"Enter d1:";
7:0,
from /usr/incl
ude/c++/7/bits/char_traits.h:39
15 cin>>dl;
Then, the average daily balance is:
16 cout<<"Enter d2:";
17 cin>>d2;
from /usr/incl
18 cout<<"Enter intrest rate per month:";
averageDailyBalance = (netBalance *
ude/c++/7/ios:40,
19 cin>>interestRate;
from /usr/incl
20 averageDailyBalance = (netBalance * dl -payment*d2)/dl;
ude/c++/7/ostream:38,
21 interest=averageDailyBalance*interestRate;
from /usr/incl
If the interest rate per month is, say, 0.0152,
22 cout<<"The interest rate is:" <<fixed <<
ude/c++/7/iostream:39,
then the interest on the unpaid balance is:
2:00 PM
11/21/2021
目 S
Transcribed Image Text:M myMCC | Middlesex College - O Programming Exercise 3-7 * MindTap - Cengage Learning x C Chegg Search > Bing A ng.cengage.com/static/nb/ui/evo/index.html?deploymentld=5781122319546088747421251303&elSBN=9781337274715&snapshotld=2618406&id=1306226479&takel. E * CENGAGE MINDTAP Q Search this course Mohammad v Programming Exercise 3-7 Instructions main.cpp >- Terminal 1 #include <iostream> /usr/include/c++/7/bits/stl_ite Summary rator.h:346:5: note: template 3 using namespace std; A-Z argument deduction/substitutio n failed: main.cpp:25:15: note: stream {aka std::basic_ostream< char>}' is not derived from 'co 4 Interest on a credit card's unpaid balance is 5 int main() 'std::0 calculated using the average daily balance. 7 double dl,d2,netBalance; 8 double payment, averageDailyBalance = 0, 9 interest = 0,interestRate; Suppose that netBalance is the balance nst std::reverse_iterator<_Iter ator>' shown in the bill, payment is the payment 10 cout<<"Enter the NetBalance: "; system("pause"); made, d1 is the number of days in the 11 cin>>netBalance; In file included from /usr/incl ude/c++/7/bits/stl_algobase.h:6 billing cycle, and d2 is the number of days 12 cout<<"Enter the Payment: "; payment is made before billing cycle. 13 cin>>payment; 14 cout<<"Enter d1:"; 7:0, from /usr/incl ude/c++/7/bits/char_traits.h:39 15 cin>>dl; Then, the average daily balance is: 16 cout<<"Enter d2:"; 17 cin>>d2; from /usr/incl 18 cout<<"Enter intrest rate per month:"; averageDailyBalance = (netBalance * ude/c++/7/ios:40, 19 cin>>interestRate; from /usr/incl 20 averageDailyBalance = (netBalance * dl -payment*d2)/dl; ude/c++/7/ostream:38, 21 interest=averageDailyBalance*interestRate; from /usr/incl If the interest rate per month is, say, 0.0152, 22 cout<<"The interest rate is:" <<fixed << ude/c++/7/iostream:39, then the interest on the unpaid balance is: 2:00 PM 11/21/2021 目 S
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Types of Function
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
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning