program main
implicit none 
integer :: i,a,b 
real :: m 
print*, "enter the value of x and n "
read*, a,b 
m=1 
do i = 1, abs(b)
if (b==0) then 
m=1 
else if (b>0) then
m = m*a 
else 
m= m/a 
end if 
end do 
print*, "the answer is", m 
end program main

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: