Calculate Power of a Number

Given a double number, x, and an integer, n, write a function to calculate x raised to the power n.

Statement

Given a double number, xx, and an integer, nn, implement a function to calculate xx raised to the power nn.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.