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

Problem: Write a program that prints out the payment plan for a house. Ask the u

ID: 670520 • Letter: P

Question

Problem:

Write a program that prints out the payment plan for a house. Ask the user to input the amount owed on the house, the interest rate of the loan as a percent per year, and the monthly payment value. Your program should print a chart with a row for each monthly payment. The columns of the chart should be the month (as an integer), the amount of the payment, and the amount owed after the payment is made. All the numbers in the second column should be the same except for possibly the last value. Also, your program should detect if the monthly payment is too small to ever pay off the loan. If this is the case, simply output an error message instead of the chart.

Output Details:

Your chart should print out three pieces of information for each month: the month number starting at 1, the payment value printed to 2 decimal places in dollars, and the amount still owed, printed to 2 decimal places in dollars. Each value should be separated by either one or two tabs (“ ”). Create headers for each column of the chart.

I need to program it on Dev-C not "Dev-C++" coding, Thanks...

Explanation / Answer

# include<stdio.h>

# include<conio.h>

int main(void)

{

float owed_amt, inter_rate, monthly_payment;

int month =1, amt_paid, remain_balance;

printf("enter the amount owed on the house in $");

scanf("%f", &owed_amt);

printf("enter the interest rate ");

scanf("%f", &inter_rate);

printf("enter the amount of monthly payment in $");

scanf("%f",&monthly_payment);

amt_paid= monthly_payment;

for (month=1; month< =12; month++)

{

if (inter_rate >=1)

{

inter_rate = inter_rate/100;

}

remain_balance= remain_balance * (1+ inter_rate /12) - amt_paid;

printf("month monthly_payment remain_balance", month,amt_paid, remain_balance);

printf(" ");

}

getchar();

return 0;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote