Your Ad Here

Fibonacci sequence .....

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.

ANSWER WILL BE PUBLISHED ON : 06/07/11

Solution Of Adding Multiple Trouble

ANSWER ==== 233168
#include<iostream>
using namespace std;
int main()
{
long long int old , ne , sum;
sum = 0;
for(int k=0;k<1000;k++)

    if(k%3==0 || k%5==0)
    {  
        sum = sum + k;
    }
}
cout<<sum;

return 0;
}

Adding Multiple Trouble


If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.

Solution On --- 5/07/11

10,000 Unique Pageviews Celebration

To All the people , from authors to commentators to just visitors , code-globe community has received a windfall of page-views since its launch in 2009 , adding my page-views of dotnetsnippets.co.cc (old version) the page-views would add upto 15000(approx) .. :).
I have momentarily started working hard for a C++ competition held at Vadodra organized By Computer Society Of India and will be posting C++ challenges in next of my posts .