Advertisement
olaaa

Untitled

Nov 18th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1.  
  2.  
  3. #include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. float potega(float p, int w) { //p^w
  8.  
  9. if (w == 0) {
  10. return 1;
  11. }
  12. else {
  13. return p = p * potega(p, --w);
  14.  
  15. }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement