Ok, I got it. This is really good help.
My program ended up looking like this:
Code:
main()
{
const int i = 500;
int n = 0, y = 0;
double r, a;
char c[20];
cout << "---------------------Banky-bank loans--------------------" << endl
<< "We offer loans at only 8.5, 9 or 10%, " << endl
<< "depending on how long the repayment period will be." << endl
<< "---------------------------------------------------------" << endl
<< "We charge a minor 500 credit administration fee." << endl
<< "---------------------------------------------------------" << endl;
cout << endl << "What currency do you wish to use? ";
cin >> c;
cout << endl << "Inset amount you want to borrow ";
cin >> a;
while (!( y == 1 || y == 3 || y == 10))
{
cout << endl << "Do you want the 1, 3 or 10 year repayment plan? ";
cin >> y;
}
if (y == 1) r = 8.5;
else if (y == 3) r = 9;
else r = 10;
while (n < y)
{
a += (a/100)*r;
n++;
}
cout << fixed << setprecision(2) << endl
<< "You'll pay a monthly rate of " << (i+a)/(12*y) << " " << c << endl
<< "You will have payed " << a+i << " " << c << " in all" << endl;
}