Computer Science, asked by shraddha0608200488, 10 months ago

write a program to find the difference between compound interest and simple interest at program terminates as soon as the user enters the timer 0 equal to zero take the principal rate and time as input from the console using java​

Answers

Answered by drsumathimath
1

Answer:

Kgxfyfzz7txgccohcihcihcccichciuhchciihcihfihcihcihcihv coding and decoding

Eeror

Error

Error

Error

Answered by anishasa
5

Answer:

Explanation:

import java.util.Scanner;

public class JavaApplication {

public static void main(String[] args) {

     

       float p, r, t;

       Scanner s = new Scanner(System.in);

       System.out.print("Enter the Principal : ");

       p = s.nextFloat();

       System.out.print("Enter the Rate of interest : ");

       r = s.nextFloat();

       System.out.print("Enter the Time period : ");

       t = s.nextFloat();

       float si,ci;

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

       ci = (float) (p* Math.pow((1 +r/100),t));  

       float Difference = (float) (ci-si);

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

       System.out.println("The Compound Interest is : " + ci);

       System.out.println(Difference);

   }

}

Similar questions