View the step-by-step solution to:

#include <iostream> using namespace std; int main () { double double double double double loanAmount; monthlyPayment; counter; amountDue; total...

Write a program in C++ that calculates the balance due each month on a non-interest loan. Ask the user for the loan amount and how much s/he will pay each month. Display the balance of the loan for each month and then the final payoff figure. Use the following screen shots as a guide. NOTE: If there is no final payment, DO NOT display the message "The last payment is…".
Output:
Please enter amount of loan: 200
please enter amount of monthly payment: 100
month 1 balance is 100 after payment
month 2 balance is 0 after payment
AND
Please enter amount of loan: 202
please enter amount of monthly payment: 100
month 1 balance is 101 after payment
month 2 balance is 1 after payment
the last payment is 1

#include <iostream> using namespace std; int main () { double loanAmount; double monthlyPayment; double counter; double amountDue; double total = 0; cout << "Please enter the amount of the loan: "; cin >> loanAmount; cout << endl; cout << "Please enter the amount of the payment each month: "; cin >> monthlyPayment; cout << endl; // while or for loop? // how do i get it to display $1 }
Background image of page 1
Sign up to view the entire interaction

Top Answer

Dear Student Please find... View the full answer

8195064-Computer Science.CPP

#include&lt;iostream.h&gt;
#include&lt;conio.h&gt;
void main()
{
int loanamt,payamt,pendingamt,secondamt;
clrscr();
cout&lt;&lt;&quot;Please Enter the loan amount: &quot;;
cin&gt;&gt;loanamt;...

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online