Skip to content

Commit

Permalink
Create simple-interest.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Cod-e-Codes authored Nov 18, 2024
1 parent c0d11ce commit 459d450
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions simple-interest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# This script calculates simple interest given principal,
# annual rate of interest, and time period in years.
echo "Enter the principal:"
read p
echo "Enter rate of interest per year:"
read r
echo "Enter time period in years:"
read t
s=$((p * t * r / 100))
echo "The simple interest is: $s"

0 comments on commit 459d450

Please sign in to comment.