answersLogoWhite

0

#include<iostream.h>

#include<conio.h>

void main()

{

long int n,a=0,b=1;

cout<<"dear user Enter number as u wish";

cin>>n;

while(n>0)

{

c=a+b;

cout<<"c<<"\t\t";

a=b;

b=c;

}

getch();

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

How do i Write a programme to show the fabonasi numbers?

Step 1. Learn the word "Fibonacci"...


How do write searching number programme in java?

give description of that then i will send the answer


Write a C programme to count the number of vowals present in your name?

abhimanyu


Write a java programme to check whether the number is twin prime or not?

Find a prime number, add 2 to the number. Check if the new number is prime. IE : 3 is prime. 3+2 =5. 5 is prime. (3,5) are twin primes.


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.


Write a programme for substraction of two numbers in c language?

substracion of any two number program in c


Write a program By using if else statement to read a number and check whether it is positive or negative?

write a c++program by using if statement to read a number and check whether it is positive or negative


Write an algorithm to check whether a number is a prime number or not?

You can write out this algorithm. This will then be programmed into the device to make determining prime numbers easier.


Write a program to print the Fibonacci series in php upto input value using recursive function?

The Fibonacci sequence uses recursion to derive answers. It is defined as: F0 = 0 F1 = 1 Fn = F(n - 1) + F(n -2) To have this sequence printed by a php script use the following: function fibonacci($n) { if($n 1) return 1; //F1 else return fibonacci($n - 1) + fibonacci($n - 2); //Fn } This recursive function will print out the Fibonacci number for the integer n. To make it print out all the numbers in a particular set add this to your script. for($i = 0; $i &lt; 15; $i++) { echo fibonacci($i) . "&lt;br /&gt;"; } So your final result would look like. &lt;?php function fibonacci($n) { if($n 1) return 1; else return fibonacci($n - 1) + fibonacci($n - 2); } for($i = 0; $i &lt; 15; $i++) { echo fibonacci($i) . "&lt;br /&gt;"; } ?&gt;


How do you write an acrostic poem for the word Fibonacci?

Fibonacci's first name was leonardoItaly was were he was bornBorn in ....O,1,1,2,3,5,8,13...Natually a geniusA simple person who became famousConsidered to be the best mathmatitionCreator of the Fibonacci sequenceI....{think for your self lazy}by Donhead pupil in year 6


Write a Fibonacci function then takes an input from the user in main program and pass to function which prints Fibonacci series up to this number in c language by using while statement?

#include#includevoid fibonacci(int x){int f=0,m=-1,n=1,i=0;while(i


Would you Write c plus plus program using array for Fibonacci number?

You can write a C++ fib pro using arrays but the problem is the prog becomes very complicated since u need to pass the next adding value in an array.....