- 1
Calculate power using recursion program for a banking application in c++?
Please solve this
3 Answers
+ 3
Do not post same question again and again..
https://www.sololearn.com/Discuss/3056706/?ref=app
+ 2
You can do something like this.Where n would be the number and p would be the power.
int power(int n, int p){
if(p == 0) return 1;
return n * power(n , p - 1);
}
+ 1
Tsering Pls avoid answering with finished code, because this makes the OP skip the most important part of learning. Prefer giving hints for the OP to find the solution.