প্রোজেক্ট ইউলার সমস্যা ০২ (ইভেন ফিবনাচ্চি নাম্বার)

Problem Link 


/*------------------------------------------------*/
// problem source: projecteuler.net
// Problem No: 02
//Problem Name : Even Fibonacci numbers
//Author : Shohanur Rahaman
//University : City University
//E-mail : shohan4556@gmail.com
//N.B: While Submit the code erase all the coments above
/*-----------------------------------------------*/
#include<stdio.h>
int main()
{
int long long display,sum=0;
int i,t1=0,t2=1;
display=0;
while(display<4000000){
// printf(" %lld\n ",display);
display=t1+t2;
t1=t2;
t2=display;
if(display%2==0)
sum=sum+display;
}
printf("The sum of all even value : %lld \n ",sum);
}
view raw gistfile1.c hosted with ❤ by GitHub