Advertisement
amermo

TP T-7 Z5

Apr 21st, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <functional>
  3.  
  4. std::function<int(int)> IteriranaFunkcija(std::function<int(int)> f, int n)
  5. {
  6.     return[=](int x) {int rezultat(f(x)); for (int i(1); i < n; i++) rezultat = f(rezultat); return rezultat; };
  7. }
  8.  
  9. int main()
  10. {
  11.     system("PAUSE");
  12.     return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement