# Java program to enter the P, T, R, and calculate its Simple Interest

ADVERTISEMENTS

Java program to enter the P, T, R, and calculate its Simple Interest. There are you will learn how to find the Simple Interest through P, T, R in the Java language.

**Formula:**

*SI = (P * T * R) / 100*

**Where:**

*P = principal amount*

*T = time*

*R = rate*

*SI = simple interest*

Let us understand this example through Java program:

```
// Java program to enter the P, T, R, and calculate its Simple Interest
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter the principal (amount), time, and rate::\n");
float p = in.nextFloat();
float t = in.nextFloat();
float r = in.nextFloat();
float SI;
// p = principal
// t = time
// r = rate
// SI = simple interest
// Calculate simple interest
SI = (p * t * r) / 100;
// Output
System.out.println("\nSimple Interest = " + SI);
}
}
```

**Output:**

Enter the principal (amount), time, and rate::

5

7

9

Simple Interest = 3.15