CHRIST MCA 2009-2012
Would you like to react to this message? Create an account in a few clicks or log in to continue.

8. WASS to accept 2 x and y , and find the XY ( x raised to the power y )

Go down

 8.	WASS to accept 2  x and y , and find the XY ( x raised to the power y )  Empty 8. WASS to accept 2 x and y , and find the XY ( x raised to the power y )

Post  sowmya Wed Jul 21, 2010 9:40 pm

clear
echo "Enter value of n"
read n
echo "Enter value of y"
read y
i=1
j=n
while test $i -lt $y
do
j=`expr $j \* $n`
i=`expr $i + 1`
done
echo "Value of $n to the power of $y is $j"

sowmya

Posts : 5
Join date : 2010-07-21

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum