Computer Science, asked by subadibhoomi, 5 months ago

write a program to enter principal amount,rate of interest and time period. Calculate and print simple interest? send in Java language

Answers

Answered by dattarajshinde44
3

Answer:

import java.util.*;

public class simpleinterest

{

   public static void main(String[] args)

   {

       double p,r,t;

       System.out.println("Please Enter Principal");

       Scanner sc = new Scanner(System.in);

        p = sc.nextInt();

       System.out.println("Please Enter The Rate of Interest");

        r = sc.nextInt();

       System.out.println("Please Enter The Time");

        t = sc.nextInt();

       si = (p*r*t)/100;

       System.out.println("The Simple Interest " +si);

   }

}

Answered by atrs7391
0

package Brainly_Answers.Program;

import java.util.Scanner;

public class Simple_Interest {

   public static void main(String[] args) {

       Scanner sc = new Scanner(System.in);

       System.out.println("Enter Principle amount: ");

       double p = sc.nextDouble();

       // p means Principle amount

       System.out.println("Enter Rate of Interest per year: ");

       double r = sc.nextDouble();

       //r means Rate of Interest per year

       System.out.println("Enter Time in years: ");

       double t = sc.nextDouble();

       //t means Time in years

       double si = (p*r*t)/100;

       //si means Simple Interest

       double fa = p+si;

       //fa means Final Amount

       System.out.println("Simple Interest on the principle amount: "+si);

       System.out.println("Final amount after adding the principle to the S.I.: "+fa);

   }  

}

Similar questions