Calculate SIMPLE INTEREST bash scripting UNIX shell scripting

Using read keyword it will get three input like principal value, rate of interest, and time period. UNIX Linux shell script command expression
Expr $p*$t*$r it will calculate the simple interest. CS1252 Operating Systems lap
Source code bash shell Programming Algorithm
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 Calculate SIMPLE INTEREST CS1252 Operating Systems lap
[redhat35@localhost Rhel5]$ sh si.sh
Enter the principle value:
2000
Enter the rate of interest:
4
Enter the time period:
10
The simple interest is
800

Post a Comment

0 Comments