Question

Write a program in C++ to solve the following problem: A sailboat costs $75,000. You pay...

Write a program in C++ to solve the following problem:
A sailboat costs $75,000. You pay 15% down and amortize the rest with equal monthly payments over a 10-year period. If you must pay 7.75% compounded monthly, what is your monthly payment? How much interest will you pay?
???= ?? ×?1− (1+?)−?
?= ??
?=??
??? ⇒???????? ??????? (????ℎ?? ???????) ?? ⇒??????? ????? (???? ??????) ? ⇒?????? ???? ?? ???????? ? ⇒??????????? ???????? ? ⇒????
Note: Do not declare any constants.Input: Cost of Sailboat, Downpayment, Rate of Interest, and TimeOutput: Monthly Payment and Interest

0 0
Add a comment Improve this question Transcribed image text
Answer #1
#include <iostream>
#include <cmath>

using namespace std;

int main() {
    double sailBoatCost = 75000, rate = 0.0775;
    double remainingPayment = 0.85 * sailBoatCost;
    double monthlyPayment = remainingPayment * (1.0 + rate / 12.0) * (1.0 - 1 / (1.0 + rate / 12.0)) / (1.0 - pow(1.0 / (1.0 + rate / 12.0), 120.0));
    cout << "Monthly payment is " << monthlyPayment << endl;
    cout << "Total payments paid will be " << (120.0 * monthlyPayment) << endl;
    cout << "Total interest paid is " << ((120.0 * monthlyPayment) - remainingPayment) << endl;
    return 0;
}
Add a comment
Know the answer?
Add Answer to:
Write a program in C++ to solve the following problem: A sailboat costs $75,000. You pay...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT