answersLogoWhite

0

#include

#include

void main()

{

int a=0,b=1,c,i=2,n;

clrscr();

printf("enter no");

scanf("%d",&n);

if(n==0)

printf("%d\n",a);

else

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

while(i<=n) {

c=a+b;

printf("%d",c);

a=b;

b=c;

i++;

}

getch();

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering

Write a java program to print the last digit in Fibonacci series?

Just generate the Fibonacci numbers one by one, and print each number's last digit ie number%10.


Fibbomacci series using recursion shell programming?

Here is a good answer for recursion Fibonacci series. #include &lt;stdio.h&gt; #include &lt;conio.h&gt; long Fibonacci(long n); int main() { long r, n,i; printf("Enter the value of n: "); scanf("%ld",&amp;n); for(i=0;i&lt;=n;i++) { printf(" Fibonacci(%ld)= %ld\n", i,Fibonacci(i)); } getch(); return 0; } long Fibonacci(long n) { if(n==0 n==1) return n; else { return (Fibonacci(n-1)+Fibonacci(n-2)); } } for n=5; Output: Fibonacci(0)=0 Fibonacci(1)=1 Fibonacci(2)=1 Fibonacci(3)=2 Fibonacci(4)=3 Fibonacci(5)=5


What is the importance of the Fibonacci series?

The Importance of Fibonacci's series is that it helps people find more patterns 1+0=1 1+1=2 1+2=3 2+3=5 5+3=8 etc.


Java script program to Print the Fibonacci series using array?

&lt;script type = "text/javascript"&gt; var input; var rev = 0; input=window.prompt ("Please enter a 5-digit number to be reversed."); input = input * 1; while (input &gt; 0) { rev *= 10; rev += input % 10; input /= 10; } document.write ("Reversed number: " + rev); &lt;/script&gt;


Write a shell program to generate fibnacci series using while loop?

//WAP to print fibonacci series using do-while loop.? using System; class Fibonacci { public static void Main() { int a=1,b=1; int sum=0; Console.Write("Enter Limit:"); int n=Int32.Parse(Console.ReadLine()); Console.Write(a); Console.Write(b); do { sum=a+b; a=b; b=sum; Console.Write(sum); } while(sum&lt;n); } } By-Vivek Kumar Keshari

Related Questions

Write a c program Fibonacci series using for loop in java?

Exactly what do you mean by 'C program in Java'


Is 20 a Fibonacci number?

20 is not a term in the Fibonacci series.


Who invent sEquence and series?

Fibonacci!


What is golden ratio in Fibonacci series?

As you expand the Fibonacci series, each new value in proportion to the previous approaches the Golden Ratio.


Are the Fibonacci sequence and the Fibonacci triangle the same thing?

No, the Fibonacci sequence and the Fibonacci triangle are not the same thing. The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, typically starting with 0 and 1. In contrast, the Fibonacci triangle, also known as the Fibonacci triangle or triangle of Fibonacci numbers, is a triangular arrangement of numbers that represents combinations of Fibonacci numbers, often related to combinatorial properties. While both concepts are related to Fibonacci numbers, they have different structures and applications.


Algoritham of Fibonacci series 0112358..?

132134...


Which areas of mathematics did Fibonacci specialize in?

Series


What is the 100th number in the Fibonacci series?

It is 354224848179261915075.


Who was a famous series whose mathematics occurs in nature?

The Fibonacci series.


Write a java program to print the last digit in Fibonacci series?

Just generate the Fibonacci numbers one by one, and print each number's last digit ie number%10.


What is Fibonacci number series?

A Fibonacci number series is like the example below, 1,1,2,3,5,8,13,21,34,55,89,144,233,377,610...... and so on in general Fibonacci numbers are just the previous two numbers added together starting with 1 and 0 then goes on forever.


What is the next number in the Fibonacci series?

The sum of the previous two numbers in the series.