Computer Science, asked by oa41767, 4 months ago

write a program in java to input principle,rate and time. calculate and display simple interest, SI=p*r*t/100​

Answers

Answered by harisreemedicalskylm
10

JAVA

public class Main.

{

public static void main (String args[])

{ float p, r, t, si; // principal amount, rate, time and simple interest respectively.

p = 13000; r = 12; t = 2;

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

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

}}

Hope it will help you if it is correct pls mark me as brainlist ^_^

Answered by atrs7391
1

/*

Date Created: 09-02-2021

Date Edited Last Time: ---NIL---

Question Link: https://brainly.in/question/34869633

Question: Write a program in java to input principle, rate and time.

Calculate and display simple interest. (SI=p*r*t/100)

Program Created By: atrs7391

*/

package Brainly_Answers;

import java.util.Scanner;

public class Simple_Interest {

   public static void main(String[] args) {

       Scanner sc = new Scanner(System.in);

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

       double p = sc.nextDouble();

       // p means Principal 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 principal amount: "+si);

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

   }

}

Similar questions