diff --git a/simple-interest.sh b/simple-interest.sh index 27a60fcb55..6a3bd545dd 100755 --- a/simple-interest.sh +++ b/simple-interest.sh @@ -14,12 +14,10 @@ # Output: # simple interest = p*t*r -echo "Enter the principal:" -read p -echo "Enter rate of interest per year:" -read r -echo "Enter time period in years:" -read t +read -p "Enter the principal: " p +read -p "Enter rate of interest per year: " r +read -p "Enter time period in years: " t + s=$(expr $p \* $t \* $r / 100) echo "The simple interest is: "