Computer Science, asked by gudumon, 6 months ago

Write a program to find the compound Interest.
principle=float(input("Enter principle amount:"))
time=int(input("Enter time duration:"))
rate=float(input("Enter rate of interest:"))
amount = (principle * (1 + (float(rate)/100))**time)
compound_interest=amount-principle;
print("Compound interest:- ",compound_interest)

Answers

Answered by anindyaadhikari13
2

Question:-

  • Write a program to compute compound interest.

Code:-

class CI

{

public static void main(double p, double r, double t)

{

double A=p*Math.pow(1+r/100.0,t);

double CI=A-p;

System.out.println("Compound Interest is: "+CI);

}

}

Note:-

Compound Interest is calculated by using the formula,

  •  \sf C.I=P\times\{(1+\frac{R}{100})^{T}-1\}
Similar questions