-
-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathProgram.java
More file actions
18 lines (15 loc) · 398 Bytes
/
Program.java
File metadata and controls
18 lines (15 loc) · 398 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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);
}
}
// This code is contributed by Anant Agarwal.