Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- template<typename T>
- T powF(T x, int n){ // x na stepen n;
- if(n == 0)return 1;
- return x * powF(x, --n);
- }
- int main()
- {
- // za svaki slucaj izmedju tagova "<>" dodati tip rezultata
- cout << powF<long long>(3, 33) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement