Skip to content

Commit d9d3439

Browse files
committed
update: README.md to improve description and add formula for simple interest calculation
1 parent 83026bb commit d9d3439

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

README.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,28 @@
22

33
## Simple Interest Calculator
44

5-
A calculator that calculates simple interest given principal, annual rate of interest and time period in years.
6-
7-
```
8-
Input:
9-
p, principal amount
10-
t, time period in years
11-
r, annual rate of interest
12-
Output
13-
simple interest = p*t*r
14-
```
15-
16-
_© 2022 XYZ, Inc._
5+
A calculator that computes **simple interest** given the principal amount, annual rate of interest, and time period in years.
6+
7+
### Formula
8+
\[
9+
\text{Simple Interest} = \frac{P \times R \times T}{100}
10+
\]
11+
12+
Where:
13+
- **P** = Principal amount
14+
- **R** = Annual rate of interest (in %)
15+
- **T** = Time period (in years)
16+
17+
### Example
18+
19+
**Input:**
20+
- Principal (P) = 1000
21+
- Rate (R) = 5%
22+
- Time (T) = 2 years
23+
24+
**Output:**
25+
- Simple Interest = (1000 × 5 × 2) / 100 = **100**
26+
27+
---
28+
29+
© 2022 XYZ, Inc.

0 commit comments

Comments
 (0)