/*Recursively evaluate fibonacci series to n terms*/ #include int n; int scratchpad; void fiborec(int,int); int main() { printf("\nProgram for computing the fibonaci series recursively upto n terms.\nPlease enter the value of n: "); scanf("%d",&n); printf("1 1 "); n-=2; fiborec(1,1); printf("\n"); } void fiborec(int prevhigh,int nexthigh) { if (n>0) { scratchpad=nexthigh; nexthigh=prevhigh+nexthigh; prevhigh=scratchpad; printf("%d ",nexthigh); n--; fiborec(prevhigh,nexthigh); } return; }