Advertisement
KarolWozniak

Zadanie 9

Mar 18th, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. // Karol Woźniak 18.03.2020r / poprawka 23.03.2020r
  4. using namespace std;
  5.  
  6. int liczba1,liczba2;
  7.  
  8. int POTEGA(int a,int b)
  9. {
  10.     return a=pow(a,b);
  11. }
  12.  
  13. int main()
  14. {
  15.     cout << "Podaj liczbe, ktora chcesz podniesc do potegi: ";
  16.     cin >> liczba1;
  17.     cout << "Do jakiej potegi chcesz podniesc liczbe " << liczba1 << "?: ";
  18.     cin >> liczba2;
  19.     cout << "Liczba " << liczba1 << " Podniesiona do potegi " << liczba2 << " wynosi: " << POTEGA(liczba1, liczba2);
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement