answersLogoWhite

0

1) Write a loop to multiply "x" by itself, "n" times.

2) Use recursion. If your function is called "myPower", then if the exponent is 1, return "x". Otherwise return myPower(x, n - 1).

3) But in general, and especially if you want to calculate non-integral powers, it's best to use the functions already included in the C language.

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions