How to generate 10 terms of Fibonacci series in c++? : <p>In mathematics, the Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and characterized by the fact that every number after the first two is the sum of the two preceding ones. <br> 
<br>  1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ... <br> 
I really tried,  but I couldn't mentally get it into code, Here is mine: <br></p>

<pre><code>#include &lt;iostream&gt;

using namespace std;
int main () {
cout &lt;&lt;"Fibonacci series " &lt;&lt; endl;

int arr[10];
for (int i = 0; i &lt; 10; i++){
         arr[i] = i;

         arr[i+2] = arr[i]+arr[i+1];

}
for (int i = 0; i &lt; 10; i++)
    cout &lt;&lt; arr[i] &lt;&lt; endl;



return 0;
}
</code></pre>

<p>What should I do to represent 10 terms of Fibonacci series?</p>
