Written by Sai Sandeep Thota on April 17, 2013 in Programming > Shell

Shell Script to Find Simple Interest

GET ALERTS:

Get our Latest updates delivered to your mailbox!

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

{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: