int years = 0;
while (years < 20)
{
double interest = balance * rate / 100;
balance = balance + interest;
}
int years = 20;
while (years > 0)
{
years++; // Oops, should have been years--
double interest = balance * rate / 100;
balance = balance + interest;
}