Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- unsigned input;
- unsigned liczba;
- unsigned long long pow(unsigned n, unsigned a)
- {
- if(n==0){return 1;}
- return pow(n-1, a) * a;
- }
- int main()
- {
- cout << "jaka liczba?: ";
- cin >> liczba;
- cout << "do jakiej potegi?: ";
- cin >> input;
- cout << pow(input, liczba) << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement