Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- auto fact = [&](auto self, int x)->int {
- if (!x) {
- return 1;
- }
- return x * self(self, x - 1);
- };
- cout << fact(fact, 7) << endl;//5040
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement