Blog

C Program to Find Nth Fibonacci Number Using Recursion

include int fib (int);int main (){int n, result;printf (“Enter the Nth Number: “);scanf (“%d”, &n);result = fib (n);printf (“The %dth number in Fibonacci series is %d\n”, n, result);return 0;} /* function for recursive fibonocci call */int fib (int n){if (n == 0){return 0;}else if (n == 1){return 1;}else{return (fib (n – 1) + fib (n …

Start reading C Program to Find Nth Fibonacci Number Using Recursion

C Program for Monthly Bill of a Newspaper

Algorithm for to calculate monthly bill of newspaper Algorithm: Read the number of days. Read the new paper cost. Read the Service charge. if there is a service charge, calculate price using service charge + (no of days* news paper cost) If there is no service charge calculate using, no of days* news paper cost print the …

Start reading C Program for Monthly Bill of a Newspaper