To the Power [Shell Program]



echo "Enter the
Value of x"


read x


echo "Enter the
Value of y"


read y


r=1


while [ $y -gt 0 ]


do


r=`expr $x \*
$r`


y=`expr $y - 1`


done


echo "The value
of x^y is:"
$r








0 Comments