Computer Science, asked by williamssiren686, 8 months ago

Write a program in java to input the principal, rate of interest and time in year. Find out compound
interest.
Compound interest=p* [1+r / 100)t – 1]

Answers

Answered by Anonymous
6

Answer:

A = P(1 + r/n)nt

A = Accrued Amount (principal + interest)

P = Principal Amount.

I = Interest Amount.

R = Annual Nominal Interest Rate in percent.

r = Annual Nominal Interest Rate as a decimal.

r = R/100.

t = Time Involved in years, 0.5 years is calculated as 6 months, etc.

Explanation:

// Java program to find compound interest for

// given values.

import java.io.*;

class GFG

{

public static void main(String args[])

{

double principle = 10000, rate = 10.25, time = 5;

/* Calculate compound interest */

double CI = principle *

(Math.pow((1 + rate / 100), time));

System.out.println("Compound Interest is "+ CI);

}

}

Similar questions