Skip to content

Instantly share code, notes, and snippets.

@b-coimbra
Last active May 18, 2017 23:23
Show Gist options
  • Save b-coimbra/d92b2909d2a673209c2ffffdbd9370e7 to your computer and use it in GitHub Desktop.
Save b-coimbra/d92b2909d2a673209c2ffffdbd9370e7 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <cstdlib>
int main(int argc, char *argv[0]) { static int (*self)(int) = [](int i)->int { return i <= 1 ? i : self(i-1) + self(i-2); };
std::cout << self(atoi(argv[1])); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment