- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimpleInterest.java
More file actions
Latest commit
22 lines (19 loc) · 574 Bytes
/
Copy pathSimpleInterest.java
File metadata and controls
22 lines (19 loc) · 574 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/**
*
* @author Mudassar
*/
importjava.util.Scanner;
publicclassSimpleInterest {
publicstaticvoidmain(String[] args) {
doubleprinciple,rate,period,interest;
Scannersc=newScanner(System.in);
System.out.println("Enter principle amount:");
principle=sc.nextDouble();
System.out.println("Enter rate of interest:");
rate=sc.nextDouble();
System.out.println("Enter period:");
period=sc.nextDouble();
interest=principle*rate*period;
System.out.println("Interest:"+interest);
}
}