program NUM
    integer::X,n,p,product,i
    product=1
    print*,"Enter the number x and n"
    read*,X,n
    if (n>0) p=n
    if (n<0) p=-n
    DO i=1,p,1
    product= product * X
    end DO
    PRINT *,"The Product", product
end program NUM

Embed on website

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