Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(int argc, char *argv[]) {
- int a=1,b=2,somme,pairsomme=2;
- while( (a+b)<4000000 ) {
- somme=a+b;
- a=b;
- b=somme;
- if (somme%2==0)
- pairsomme=pairsomme+somme;
- }
- printf("la somme des pairs est :\n",pairsomme);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement