- 1

Calculate power using recursion program for a banking application in c++?

Please solve this

7th Jul 2022, 2:41 AM
M Madhan
3 odpowiedzi
+ 3
Do not post same question again and again.. https://www.sololearn.com/Discuss/3056706/?ref=app
7th Jul 2022, 2:47 AM
Mihir Lalwani
Mihir Lalwani - avatar
+ 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); }
7th Jul 2022, 3:30 AM
Lama
Lama - avatar
+ 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.
7th Jul 2022, 2:38 PM
Emerson Prado
Emerson Prado - avatar