Join
Blogs
Questions
Videos
Tags
Members
Search
 
 
Create your own blog, earn points and get popular!

Simple Interest

Ragi Patel's picture

Simple Interest Calculation in Java

3
Your rating: None Average: 3 (1 vote)
  1. /*
  2.  * Simple Interest Calculation in Java
  3.  */
  4. import java.io.*;
  5.  
  6. class SimpleInterestCalculation{
  7.  
  8.  public static void main(String s[]){
  9.  
  10.   float p=0f;
  11.   float r=0f;
  12.   int n=0;
  13.   float si = 0.0f;
  14.  
  15.   String s1;
  16.   DataInputStream d1 = new DataInputStream(System.in);
  17.  
  18.   try{
  19.    
  20.     System.out.print("Enter Principal Amount: ");
  21.    s1 = d1.readLine();
Rahimv's picture

Write a program to calculate simple interest for given amount, interest rate and duration

2.2
Your rating: None Average: 2.2 (5 votes)
  1. /*
  2.  * Write a program to calculate simple interest for given amount, interest rate and duration.
  3.  * Program should take principal amount, duration and rate of interest using command line arguments.
  4.  *
  5.  */
  6. class SimpleInterest
  7. {
  8.  public static void main(String[] args){
  9.  
  10.   float principal ,rateOfInterest ,interest;
  11.   int noOfYears;
  12.  
Syndicate content