import java.util.*;
class ranjan
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int p,t,r;
System.out.print("Enter the principal amount = ");
p=sc.nextInt();
System.out.print("Enter the time period = ");
t=sc.nextInt();
System.out.print("Enter the rate of interest = ");
r=sc.nextInt();
System.out.println("Simple interest = "+(p*t*r)/100);
}
}
Output:
Enter the principal amount = 10000Enter the time period = 2
Enter the rate of interest = 5
Simple interest = 1000
0 Comments