Write a java program to calculate the compound interest for
the given number of years where rate and the basic amount
are given?
Hint: Compound Interest=Principal Amount(1+Rate/100) no of
Answers
Answered by
1
Answer:
class CompundInterest
{
public static void main(String args[])
{
double amount=0,principle=1000,rate=10,time=3,ci;
System.out.println("principle= "+principle);
System.out.println("rate="+rate);
System.out.println("time="+time);
amount=principle*((1+rate/100)*(1+rate/100)*(1+rate/100));
System.out.println("amount="+amount);
ci=amount-principle;
System.out.println("compound interest="+ci);
}
}
Explanation:-
in the amount part you have to write (1+rate/100) as much time as the no. of years....
enter the principal rupee in "principle"
enter the rate of interest in "rate"
and enter the term of years in "time"
Answered by
1
Answer:
hey i don't no.....................,.........
Similar questions