#include<stdio.h>
#include<math.h>
# define I 0.0765 //Interest Rate
char fname[20];
char lname[20];
float loan = 0.0;
int years;
double PB;
//Prototypes
double Mortgage_Calc(void);
void Financial_Report(void);
int main() {
printf(" *******************Caribbean Mortgage Company*************\n\n\n\n\n");
printf("Enter the Customer's Name (First Name and Surname)\n");
scanf("%s%s",fname,lname);
printf("Enter Requested Loan Amount\n");
scanf("%f",loan);
printf("Enter Number of Years for Mortgage\n");
scanf("%d",years);
Financial_Report();
return(0);
}
double Mortgage_Calc(double PB, double A, double Y) {
//PB :payback
//A :Amount Loaned
//Y:Number of Years over which the mortgage extends
PB = A * pow((1 + I), years);
/*A*1.0+ I/100;
A=exp(Y);
PB=A;
years=Y;
principal * pow((1 + rate), (double)years); */
return(PB);
}
void Financial_Report()
{
printf(" *******************Caribbean Mortgage Company*************\n");
printf(" ************************Financial Report******************\n\n\n\n\n");
printf("Applicant's Name: %s %s", fname,lname);
printf("Requested Loan Amount: %f",loan);
printf("Interest Rate: 7.65 percent");
printf("Number of Years for Mortgage: %d", years);
printf("Total Amount to be Paid Back: %f",PB);
// printf("The Monthly Installments are:
}
SlightlyAngelic 0 Newbie Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
Salem 5,199 Posting Sage
SlightlyAngelic 0 Newbie Poster
Salem 5,199 Posting Sage
SlightlyAngelic 0 Newbie Poster
Salem 5,199 Posting Sage
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.