Write a C program to print the Fibonacci series using recursion and without using recursion.
Question
Solution 1
Sure, here are the C programs to print the Fibonacci series using recursion and without using recursion.
- Fibonacci series using recursion:
#include<stdio.h>
void printFibonacci(int n){
static int n1=0,n2=1,n3;
if(n>0){
n3 = n1 + n2;
n1 = n2;
n2 = n3;
Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI
Similar Questions
create a C program to print Fibonacci series upto a specified number N using while loop.
Write a C program to read a sentence and replace lowercase characters with uppercase and vice versa without using fgets function and without using the pointer
Write a program to enter two numbers and print the arithmeticoperations like +,-,*,**, /, // and % using function
Write a program in C to print a string in reverse using a character pointer.Also print the uppercase of the first letter of the reversed word.
write a program to print integer no, from 1 to n where n is the input from the user using do while loop in c language use getch
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.