Thursday, June 14, 2018

SHELL SCRIPT TO CALCULATE SIMPLE INTEREST

echo "Enter the principle"
read p
echo "Enter the rate of interest"
read r
echo "Enter the time"
read n
i = `(expr $p \ * $n \ * $r) / 100`
echo "The interest is : " $i





Output -> Enter the principle
                   12000
                  Enter the rate of interest
                   4
                  Enter the time
                   5
                  The interest is :  2400 

No comments:

Post a Comment