Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help entering and correcting the bugs (errors) in this program. 1 //Lab9-2. cpp - displays two monthly car payments 2 //Created/revised by on

I need help entering and correcting the bugs (errors) in this program.

image text in transcribedimage text in transcribed
1 //Lab9-2. cpp - displays two monthly car payments 2 //Created/revised by on 4 #include 5 #include 6 #include 7 using namespace std; 8 9 / /function prototype the names 10 double getPayment (int, double, int); of the formal parameters are 11 not required 12 int main() 13 { 14 int carPrice = 0; 15 int rebate = 0; 16 double creditRate = 0.0; 17 double dealerRate = 0.0; 18 int term = 0; 19 double creditPayment = 0.0; 20 double dealerPayment = 0.0; 21 22 cout > carPrice; 24 cout > rebate; 26 cout > creditRate; 28 cout > dealerRate; 30 cout > term; 32 33 //call function to calculate payments 34 creditPayment = getPayment (carPrice - rebate, 35 creditRate / 12, term * 12); 36 dealerPayment = getPayment (carPrice, 37 dealerRate / 12, term * 12); 38 39 //display payments 40 cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions