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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education