Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

DIRECTIONS Follow the instructions for starting your C++ development tool. Depen

ID: 3813234 • Letter: D

Question

DIRECTIONS Follow the instructions for starting your C++ development tool. Depending on the development tool you are using, you may need to create a new project; if so, name the project Lab9-2 Project, and save it in the Cpp8Chap09 folder. Enter the instructions shown in Figure 9-34 in a source file named Lab9-2.cpp. (Do not enter the line numbers.) Save the file in either the project folder or the Cpp8 Chap09 folder. Now follow the appropriate instructions for running the Lab9-2.cpp file. Test the program using the same data you used to desk-check the program. If necessary, cor- rect any bugs (errors) in the program.

Explanation / Answer

char repeat = 'Y';
   while (repeat == 'Y')
   {
      

       // copy and paste your full code here

       //include following code before making calls to calculatepayments()
       if (floor(creditRate) == creditRate)
       {
           //creditRate is expressed in percentage
           creditRate = creditRate / 100;//convert it to decimal
   }

       if (floor(dealerRate) == dealerRate)
       {
           //creditRate is expressed in percentage
           creditRate = creditRate / 100;//convert it to decimal
       }


       //include following code before "return 0"
       if (creditpayment < dealerpayment)
       {
           cout << "take rebate and finance through credit union" << endl;
       }
       else if (creditpayment > dealerpayment)
       {
           cout << "don't take rebate. finance through dealer" << endl;
       }
       else
       {
           cout << "you can finance through delaer or credit union" << endl;
       }


       cout << "do you want to repeat (Y/N)??" << endl;
       cin >> repeat;
   }
  

//Note make sure you put these codes in proper place.

// i was not able to copy your code since it is an image

// aif possible always try to paste codes in text rather than images.