Monday 9 July 2012

Write a shell script to find the simple interest.

Script-3

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"

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

3 comments:

Unknown said...

Nice program
pay per click

Unknown said...

how can we give float input

Unknown said...

helpful program.....also simple

Post a Comment