#include #include //This function is tal-recursive long counter(long n) { if (n == 0) return 1; if (n%100000==0) printf("%ld\n", n); return counter(n-1); } //Usage: a.out NUM // where NUM is the number of recursion to do. int main(int argc, char * argv[]) { long sf = (long)strtof(argv[1], NULL); printf("%d\n", counter(sf)); }