Solution to Pow(x, n) Problem

Iterative approach