Shell Script to Find Simple Interest

Do you remember doing Simple Interest problems in your 5th grade? We use the same old formula for calculating the Simple Interest by collecting the Principle Amount, Time and Rate of Interest.

echo "Enter Amount:"
read p
echo "Enter Time:"
read t
echo "Enter ROI:"
read r

i=` expr $p \* $t \* $r `
i=` expr $i / 100 `

echo "Simple Interest is: $i"

Output:
simpleinterest

Leave a Reply