Calculate Simple Interest in Java

Calculate Simple Interest in Java

Here you will get the example code to Calculate Simple Interest in Java programming.

Simple Interest Formula is :

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

where SI is the interest, P is the principal amount, R is the interest rate, and T is the time in years.

Example code to Calculate Simple Interest in Java

Output

C:\CodeRevise\java>javac SimpleInterest.java

C:\CodeRevise\java>java SimpleInterest
Enter the principal amount: 5000
Enter the rate of interest (as percentage): 5
Enter the time (in years): 3
Simple Interest: 750.0

 

 

Check out our other Java Programming Examples

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top