Skip to content

Commit 89e74ff

Browse files
Create simple-interest.sh
1 parent 745033c commit 89e74ff

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

simple-interest.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Simple Interest Calculator
2+
3+
echo "Enter Principal amount:"
4+
read principal
5+
6+
echo "Enter Rate of interest:"
7+
read rate
8+
9+
echo "Enter Time (in years):"
10+
read time
11+
12+
# Calculate Simple Interest = (P * R * T) / 100
13+
si=$(( (principal * rate * time) / 100 ))
14+
15+
echo "Simple Interest is: $si"

0 commit comments

Comments
 (0)