#include <stdio.h>
#include <iostream>
#include <conio.h>
#define p printf
#define s scanf
float np, in, ir, pf, ad, md, re, rr,pfl,al;
char bn[20],bc[5],rn[10], c[10];
main()
{
system("title Application No. 2");
system("color F4");
do
{
p("\nEnter your name please: ");
s("%s", &bn[20]);
p("\nEnter your code (A-C): ");
s("%s", &bc[5]);
p("\nEnter your Amount Loan: ");
s("%f", &al);
p("\nEnter your Number of Months to pay: ");
s("%f", &np);
{
if (bc[5] == 'A')
ir=.07;
else if (bc[5] == 'B')
ir=.05;
else if (bc[5] == 'C')
ir=.03;
else
p("From A-C only");
}
{if (al <5000)
pf = .02;
else if (al<10001)
pf = .03;
else if (al<20001)
pf = .04;
else
pf = .05;
}
{if (np <7)
rr= .01;
else if (np <16)
rr= .02;
else if (np <24)
rr= .03;
else
rr = .04;
}
in = ir * al * np;
pfl = (pf*al);
ad = al + in + pfl;
md = ad / np;
re = rr * al;
system("cls");
p("\n\n\n\t\t\t\t%s", &bn[20]);
{
if (ir == .07)
p("\n\t\t\t\tnNew");
else if (ir == .05)
p("\n\t\t\t\tJunior");
else
p("\n\t\t\t\tSenior");
}
p("\n\n\tAmount Loan: \t%10.2f", al);
p("\n\tInterest: \t%10.2f", in);
p("\n\tProcessing Fee: %10.2f", pfl);
p("\n\tAmount Due: \t%10.2f", ad);
p("\n\tMonthly Due: \t%10.2f", md);
p("\n\tRebate: \t%10.2f", re);
p("\n\n\n\nTo continue, enter Y, to exit, enter anykey: ");
s("%s", &c[5]);
system("cls");
p("\t\t\tNew Page");
}
while (c[5] == 'Y' && c[5] =='y');
return 0;
getch();
}
ueoptimum 0 Newbie Poster
phoenix911 28 Junior Poster
ueoptimum 0 Newbie Poster
phoenix911 28 Junior Poster
ueoptimum 0 Newbie Poster
ueoptimum 0 Newbie Poster
Pynolathgeen 19 Light Poster
MyrtleTurtle commented: That wasn't very helpful, was it? +0
Fbody commented: Worthless...If you're going to post, at least try to help. +0
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.