Computer Science, asked by sureshmithu2021, 4 days ago

write a program in c++ to print the fibonacci series with using the function fibo( )​

Answers

Answered by vinayak8257
0

Answer:

The Fibonacci sequence is a series where the next term is the sum of pervious two terms. The first two terms of the Fibonacci sequence is 0 followed by 1.

As I shown in the image this is input

So,Output will be - Enter a positive integer : 100

Fibonacci Series : 0, 1, 1, 2, 3, 5, 8, 13, 21, 34,

Hope it's help you and don't forget to follow me

Attachments:
Answered by samarthkrv
0

Answer:

#include<stdio.h>

void fibo();

void fibo()

{

      int a = 0 , b = 1, c , count;

printf("Enter how many numbers are supposed to be there in the series:");

scanf("%d" , &count);

printf("%d %d" , a , b);

for(int i = 0; i < count; i++)

{

c = a + b;

printf(" %d" , c);

a = b;

b = c;

}

}

void main()

{

fibo();

}

Explanation:

Similar questions