JakubJaneczek

Zadanie 9

Mar 24th, 2020
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4. int a,b;
  5.  
  6. int potega(int a, int b)
  7. {
  8.     if(a==10)
  9.     {
  10.         int w=pow(a,b);
  11.     }
  12.     else
  13.     {
  14.         return pow(a,b);
  15.     }
  16. }
  17.  
  18. int main()
  19. {
  20.     cout << potega(1,2) << endl;
  21.     cout << potega(3,4) << endl;
  22.     cout << potega(5,6) << endl;
  23.     cout << potega(7,8) << endl;
  24.  
  25.     return 0;
  26. }
Add Comment
Please, Sign In to add comment