Thursday, May 1, 2008

Two numbers are entered through the keyboard. Write a program to find the value of one number raised to the power of another.

# SS20

# Finds the value of one number raised to the power of another

# Usage: SS20

echo Enter the number

read number

echo Enter the power

read power

i=1

prod=1

while [$i -le $power]

do

prod=’eco $prod \* $number | bc‘

i=’expr $i+1‘

done

echo $number raised to $power = $prod

1 comment:

Mohammad Sharjil said...

Two numbers are entered through the keyboard. Write a program to find the value of one number raised to the power of another.in c# please code it