Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

public double CompoundInterest(int Amount, int Nyear, double IRate)

{
double temp = Math.Pow((1 + IRate / 12), Nyear);
int temp1=Convert.ToInt16 (Amount * temp);
int temp2 = temp1 - Amount;
return temp2;
}

public int CompoundInterest(int Amount, int Nyear, double IRate)


{
double temp = Math.Pow((1 + IRate / 12), Nyear);
int temp1 = Convert.ToInt16(Amount * temp);
int temp2 = temp1 - Amount;
return temp2;
}
public int EMI(int Amount, int Nyear, double IRate)
{
double temp1 = Amount * (IRate / 12);
double temp2 = (1 + (IRate / 12));
int months = Nyear * 12;
double temp3 = Math.Pow(temp2, months);
int ans=(Convert.ToInt16((temp1 * temp3) / (temp3 - 1)));
return ans;
}

You might also like