Write a program to calculate simple interest for any principal amount, with rate as 7.2 %
and time as 3 years
Answers
Answered by
10
Answer:
import java.util.Scanner;
class Interest
{
public static void main (String args [])
{
Scanner sc=new Scanner (System.in);
double p,i,t=3.0,r=7.2;
System.out.println ("Enter the principal");
p=sc.nextDouble ();
i=p*r*t/100;
System.out.println ("Simple Interest="+i);
}
}
Plz mark as brainliest
Explanation:
p is the principal
i is the simple interest
t is the time period
r is the rate of interest
Similar questions