Skip to content

Commit 9622795

Browse files
committed
Calculate total Interest of a sudden time
1 parent e6bae9e commit 9622795

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

File renamed without changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Find total interest of an amount.
2+
3+
Create a class Account with following attributes :
4+
id - int
5+
balance - double
6+
interestRate - double
7+
8+
Take another integer as number of year.
9+
After that calculate total interest using formula:
10+
11+
Percentage = interestRate * 100 / time
12+
Total Interest = Percentage + interestRate

0 commit comments

Comments
 (0)