This problem can be easily done by math pow function in C++.It is necessary that we do it with recursion only??