Write a program to find the difference between Simple Interest (SI) and
Compound Interest (CI) when principal, Rate and Time are given.
Answers
Answered by
1
Answer:
create three variables principal rate and time and use a division algorithm and after you get the simple interest and compound interest print both of them out
Answered by
0
import java.util.*;
public class Interest
{
public static void main (String args [])
{
Scanner in = new Scanner(System.in);
int p, r, t;
double si, ci, d;
System.out.println("enter the principal, rate and time:" );
p = in.nextInt();
r = in.nextInt();
t = in.nextInt();
si = p×r×t/100;
ci = p(1+r/100)*t-p;
d = ci - si;
System.out.println(" Difference between =" );
}
}
Similar questions
Hindi,
5 months ago
Political Science,
5 months ago
Hindi,
11 months ago
Hindi,
1 year ago
English,
1 year ago