What is wrong with this program C programming?
include
#include
#define TAX_RATE 1.25
#define UTILITY_COST 300.0
#define INSURANCE_COST 550.0
void input(float*, float*, float*);
void calc(float, float, float, float*, float*, float, float*, float);
float calcDplomo(float, float, float, float, float, float);
void output(float, float, float, float, float, float, float, float);
int main(void)
{
float sellp;
float anir;
float loand;
float downp;
float amtl;
float mortg;
float propt;
float mtot;
input(&sellp, &anir, &loand);
calc(sellp, anir, loand, &downp, &amtl, mortg, &propt, mtot);
output(sellp, anir, loand, downp, amtl, mortg, propt, mtot);
system(“pause”);
return 0;
}
void input(float* sellp, float* anir, float* loand)
{
printf(“\n\t\t Brian’s Mortgage Calculation Program\n”);
printf(“\nEnter the property’s selling price: \n”);
scanf(“%f”,sellp);
printf(“\nEnter the annual rate of interest: \n”);
scanf(“%f”,anir);
printf(“\nEnter the duration (years) of the loan: \n”);
scanf(“%f”,loand);
return;
}
void calc(float sellp, float anir, float loand, float* downp, float* amtl, float mortg, float* propt, float mtot)
{
*propt = sellp * (TAX_RATE/100)/12;
mtot = mortg + UTILITY_COST + *propt + INSURANCE_COST;
calcDplomo(sellp, anir, loand, downp, amtl, mortg);
return;
}
float calcDplomo(float sellp, float anir, float loand, float downp, float amtl, float mortg)
{
float cdown = .2;
downp = sellp * cdown;
amtl = sellp – downp;
mortg = amtl * anir/12*(1+anir/12) * loand *12/(1+anir/12) * loand *12-1;
return mortg;
}
void output(float sellp, float anir, float loand, float downp, float amtl, float mortg, float propt, float mtot)
{
printf(“\nMONTHLY COST OF HOUSE\n”);
printf(“\nSELLING PRICE $ %9.2f”,sellp);
printf(“\nDOWN PAYMENT %9.2f”,downp);
printf(“\nAMOUNT OF LOAN %9.2f”,amtl);
printf(“\nINTEREST RATE %9.1f%%”,anir);
printf(“\nTAX RATE %9.1f%%”,TAX_RATE);
printf(“\nDURATION OF LOAN (YEARS) %9.0f\n”,loand);
printf(“\nMONTHLY PAYMENT\n”);
printf(“\nMORTGAGE %9.2f”,mortg);
printf(“\nUTILITIES %9.2f”,UTILITY_COST);
printf(“\nPROPERTY TAXES %9.2f”,propt);
printf(“\nUTILITIES %9.2f\n”,INSURANCE_COST);
printf(” __________”);
printf(” $ %9.2f\n”,mtot);
return;
}