answersLogoWhite

0

#include<iostream>

int main()

{

int x=0, y=1;

std::cout<<x<<" ";

std::cout<<y<<" ";

while( y<1000000 )

{

std::cout<<(y+=x)<<" ";

x=y-x;

}

std::cout<<std::endl;

return(0);

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Can you have the program in C plus plus for recursive function generating a series of terms?

Yes, this can be done. For example for Fibonacci series. You will find plenty of examples if you google for the types of series you need to be generated.


Program to generate Fibonacci series using storage class in c plus plus?

i dn't know. haha


Create a c plus plus program to generate Fibonacci series?

#include #include void main() { clrscr() int a=0,b=1,c,i,n; coutn cout


What is the name of the series 1 plus 1 plus 2 plus 3 plus 5 plus 8 plus 13 plus 21 plus 34 plus .................................?

That's the beginning of the Fibonacci series.


What is the name of the series 1 plus 1 plus 2 plus 3 plus 5 plus 8 plus 13 plus 21 plus 34 plus .........?

It's Fibonacci's


How do you write a c plus plus recursion program to find fibonacci series?

#include&lt;iostream&gt; unsigned fib (unsigned term, unsigned a=0, unsigned b=1) { if (term&lt;1) return a; return fib (--term, a+b, a); } int main() { std::cout &lt;&lt; "Fibonacci (1000th term): " &lt;&lt; fib (1000) &lt;&lt; std::endl; }


Write a c plus plus program to find the sum of series S equals 1 plus x2 plus x3 plus x3. plus xn?

(xn+2-1)/(x2-1)


Write a program in BASIC to find the sum of the series s equals 2 plus 4 plus . plus 100?

10 print "That is not a question." 20 print "That is a command." 30 end


4 plus 10 plus 16 plus plus 70 find the sum of this series?

4 plus 10 plus 16 plus 70 equals 100. To find the sum of this series, simply add all the numbers together.


How do you find the C programming of the sum of the series 5 plus 55 plus 555 plus . plus n terms?

Find the Sum to n terms of the series 5 5+55+555+ +n Terms


Do I need to write a program to find a substring in a given string in c plus plus?

No.


What are the roots X2 plus x-1 equals 0?

The roots are -1/2 of [ 1 plus or minus sqrt(5) ] . When rounded: 0.61803 and -1.61803. Their absolute values are the limits of the Fibonacci series, or the so-called 'Golden Ratio'.