1234
size_t factorial( size_t n ) { return n ? n * factorial( n - 1 ) : 1; }
1234567891011121314151617
#include <iostream> using namespace std; void recurse(int); int main() { int recurseno=-1; recurse(recurseno); cin.get(); return 0; } void recurse(int recurseno) { recurseno+=1; cout << recurseno << " "; recurse(recurseno); }
long fib(long x) { return (x<3)?1:(fib(x-1)+fib(x-2)); }