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


Example of binaray operator in c plus plus?

+ is an example, one of many, of a binary operator in C or C++ a = b + c; // for usage example


What are the Example Output of Calculator Program in C plus plus?

example output of c++ calculator


Example of flowchart of while loop in c plus plus?

kk


Is c plus plus an unstructured programming language?

No, BASIC is, for example.


Which operator cannot be overloaded c plus plus?

comma (,) is an example


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.....


Fibonacci series codes in vb?

To generate a Fibonacci series in VB.NET, you can use a simple loop. Here's a basic example: Module Module1 Sub Main() Dim n As Integer = 10 ' Number of Fibonacci numbers to generate Dim a As Integer = 0, b As Integer = 1, c As Integer Console.Write(a &amp; &quot; &quot; &amp; b &amp; &quot; &quot;) For i As Integer = 2 To n - 1 c = a + b Console.Write(c &amp; &quot; &quot;) a = b b = c Next Console.ReadLine() End Sub End Module This code initializes the first two Fibonacci numbers and iteratively calculates the next ones, printing them to the console.


What were Fibonacci's surnames?

The renowned Middle Ages mathematician's REAL NAME was Leonardo Pisano Bigollo (c. 1170 - c. 1250), but he was known by many names, such as Leonardo of Pisa, Leonardo Pisano, Leonardo Bonacci, Leonardo Fibonacci, and just plain Fibonacci.


What type of math did Leonardo Fibonacci study?

C alculus