Code In Tech - The Ultimate World of Computer Technology

Tuesday, 5 June 2012

Shell script to find simple interest

SOURCE CODE:

echo " Enter the principle value: "
read p
echo " Enter the rate of interest:"
read r
echo " Enter the time period:"
read t
s=`expr $p \* $t \* $r / 100`
echo " The simple interest is "
echo $s



OUTPUT:

Enter the principle value:
5000
Enter the rate of interest:
2
Enter the time period:
8
The simple interest is
800

No comments :

Post a Comment