Skip to content

Commit ff24ee7

Browse files
authored
Update simple-interest.sh
Corrected the calculation of simple interest
1 parent c8dcc47 commit ff24ee7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

simple-interest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ read r
2121
echo "Enter time period in years:"
2222
read t
2323

24-
s=$(expr $p \* $t \* $r / 100)
24+
s=$(expr ($p * $t * $r )/ 100)
2525
echo "The simple interest is: "
2626
echo $s

0 commit comments

Comments
 (0)