Write a definition of function power(x, n) = xn where x is a real number and n is a positive integer, using a loop. But plan out the loop by first looking at the variables and their values. Have two variables k and p, and arrange for p = xk each time the program reaches the beginning of the loop.

Write Define ... %Define around your definition.

 

    [Language: Cinnameg  Kind: program]