Java program for simple interest
import java.util.Scanner;
public class SimpleInterest
{
public static void main(String args[ ])
{
Scanner s=new Scanner(System.in);
double p, r, t, si;
System.out.println("Enter the value of p, r, t");
p=s.nextDouble();
r=s.nextDouble();
t=s.nextDouble();
si=(p*r*t)/100;
System.out.println("Simple Interest :"+si);
}
}
Output
Enter the value of p, r, t
1000
2
3
Simple Interest :60.0
Comments