title: To calculate every third term in a Fibonacci sequence
body: <pre><code>int Fib1, Fib2, Fib3, FibSum;
  
  Fib1 = 0;
  Fib2 = 1;
  
  while(Fib3 &lt; 500000)
  {
      Fib3 = Fib1 + Fib2;
      Fib1 = Fib2;
      Fib2 = Fib3;
      FibSum = Fib3 + Fib1;
  }
  printf("%d\n", FibSum);
  return 0;
  </code></pre>
  
  <p>I want to sum every third term of a fibonacci series but my answers is 832040 and it must be 158905...any help will be grateful!</p>