write a program to accept principal,rate and time calculate and display the interest accumulated for first year second year and third year compound annually
Answers
Answered by
1
Answer:
import java.util.*;
class Prog
{
public static void main(String args [])
{
Scanner in =new Scanner(System.in);
double principal,rate,time,intrest;
System.out.println("Enter principal,time,rate");
principal=in.nextDouble();
time=in.nextDouble();
rate=in.nextDouble();
intrest=(principal*(1+rate/100)^time)-principal;
System.out.println("Intrest="+intrest);
}
}
Please mark it as Brainliest
Similar questions