Write a program in java to accept principal, rate and time. Calculate interest accumulated for first year, second year and third year compounded annually.
Attachments:
mehtabsolanki14:
hii
Answers
Answered by
1
Answer:
public class Accounting{
public static void main(String []args){
double interest = calculate_interest(45000, 0.095, 6);
System.out.println(interest);
}
public static double calculate_interest(double principle, double rate, double time) {
return(principle * rate * time);
}
}
Explanation:
The formula for interest is principle * rate * time.
Similar questions