8. WASS to accept 2 x and y , and find the XY ( x raised to the power y )
Page 1 of 1
8. WASS to accept 2 x and y , and find the XY ( x raised to the power y )
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"
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
Similar topics
» 3. WASS to find the factorial of a number
» 7. WASS to accept a file name and convert its content to uppercase
» 15 Program - WASS to accept 10 names and stores in a file called NAME.DBF
» WASS to accept a string from the user and display number of vowels
» Prog 17. WASS to accept a weekday ( 1 ,2 3 …7) from user using command line and print appropriate day in words ( Monday , Tuesday , Wednesday )
» 7. WASS to accept a file name and convert its content to uppercase
» 15 Program - WASS to accept 10 names and stores in a file called NAME.DBF
» WASS to accept a string from the user and display number of vowels
» Prog 17. WASS to accept a weekday ( 1 ,2 3 …7) from user using command line and print appropriate day in words ( Monday , Tuesday , Wednesday )
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum