Computer Science, asked by madhura89, 1 year ago

write a program to find java simple interest and amount when principal, interest and time are given

Answers

Answered by smruti472
1
In which package are you doing it lang or util package
Answered by atrs7391
0

package Brainly_Answers.Program;  

public class Simple_Interest {

   public static void main(String[] args) {        

       double p = 1500

       // p means Principle amount      

       double r = 6

       //r means Rate of Interest per year        

       double t = 5

       //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