16 lines
243 B
C++
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);
|
||
|
}
|