Code:

#include "stdafx.h"
#include <math.h>
#using <mscorlib.dll>
using namespace System;
void display_statement (double, double, double, double, int, double);
int _tmain()
{
double a=1;
double b=1;
double c=1;
double d=1;
double e=1;
double x=1;
double i; // Interest_Rate Monthly
double p; // Principal
int n ; // Number Payments
double Payment_Amount;
double payment;
double Total_Amount;
double total_amount;
double Tamount_paid;
double total_interest;
double Tinterest_paid(double, int);
double payment_amount (double, double, int);
printf("Please Enter Interest Rate "); // Key As n.n
scanf("%lf",&i);
printf("Please Enter Loan Amount "); // Amount of Loan
scanf("%lf",&p);
printf("Please Number Of Monthly payments "); // Number Of Monthly
scanf("%d",&n);
payment = Payment_Amount (i,p,n);
Total_Amount = Tamount_paid(payment,n);
total_interest=Tinterest_paid(total_amount,p);
void display_statement (double, double, double, double, int, double);
}
{
double x;
x = Tinterest_paid(200000, 150000);
printf("The result is\n\n %f', X);
return 0;
}
double Tinterest_paid (double amount_paid, double Principal)
{
double int_paid;
int_paid = amount_paid - Principal;
return (int_paid);
{
double x;
x = Payment_Amount(5.5, 100000, 60);
}
double Payment_Amount (double Interest_Rate, double Principle, int Number_Payments)
{
double a, payment;
a = Interest_Rate/100;
a= a/12;
payment = (a* Principle)/ (1 - pow((1+a), -Number_Payments));
return(payment);
}
{
display_statement (a, b, c, d, x, e);
return 0;
}
void display_statement (double payment, double loan_payment, double Tinterest, double Principal, int Number_Payments, double interestrate)
{
printf("Monthy Payment: $%.2f\n\n", payment);
printf("Total Loan Amount; $%.2f\n\n", loan_Amount);
printf("Total Interest Payment: $%.2f\n\n", Tinterest);
printf("Principal: $%.2f\n\n", Principal);
printf("Number Of Payments: %d\n\n", Number_Payments);
printf("Interest Rate %.3f percent\n\n", interestrate);
}