Like Us Like Us Facebook Subscribe Subscribe us YouTube Whatsapp Share us Whatsapp Query Send your queries

How to make a Simple Interest Calculator using Java

How to make a Simple Interest Calculator using Java

Today I am going to use Java to make a command line application called Simple Interest Calculator with working example. Code was written by my Student Abhijit [doing Bsc (Computer science)].

Simple Interest Formula

SI = PRT/100N
where P= Principle, R=Rate (Annual) ,T= Time Period, N= Frequency of calculation in one year.

Screen shot

simple -interest

Simple Interest Java Code :

import java.util.Scanner;
* By Abhijit Prasad (Student)
* Simple Interest Calculator
class SimpleInterest{
public static void main(String args[]){
double pr, ra;
int t, n;
Scanner inp = new Scanner(;
System.out.println(“Enter the Principle: “);
pr= inp.nextDouble();
System.out.println(“Enter the Rate: “);
ra = inp.nextDouble();
System.out.println(“Enter the Time Period: “);
System.out.println(“Enter the Frequency: “);
double si=pr*ra*t;
si /= n*100;
System.out.println(“Calculated S.I. “+si);

0 0 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments