Category: Recursion
code from 1: #include<stdio.h> long getFibbTerm(int t) { if(t==1||t==2) return 1; return getFibbTerm(t-1)+getFibbTerm(t-2); } int main() {…
code: #include<stdio.h> void toh(int n,int source,int aux,int dest) { if(n==1){ //just pick and place printf(“move the disk…
code: #include<stdio.h> void printNo(unsigned int n) { if(n==0) return; //it is outing from this function and going…
Recent Comments