alphacademy-cpp/quito/8.1.cpp
2022-12-13 13:25:24 +01:00

16 lines
243 B
C++

#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int hatvany (int n, int k) {
if (k == 0) return 1;
return n * hatvany(n, k-1);
}
int main () {
cout<<hatvany(2,12)<< ' '<<hatvany(5,6)<< ' ' << hatvany(1,3);
}