Powered by Blogger.

Write a shell script to find the simple interest.





echo "Enter the Principle Amount: "
read p
echo "Enter the rate of interest: "
read r
echo "Enter the number of years: "
read n

i=`expr $p \* $r \* $n`
i=`expr $i / 100`
echo "The Simple Interest is :Rs.$i"
-------------------------------------------------------------------------------------------------
->OUTPUT:
---------

Enter the Principle Amount:
5000
Enter the rate of interest:
10
Enter the number of years:
1
The Simple Interest is :Rs.500

*************************************************************************************************
Share on Google Plus

About Unknown

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment