Computer Science, asked by shristi2005, 6 months ago

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 gauravkarthik22
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 Anonymous
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