Advertisement
lucontre

ejercicio clase 26 abril

Apr 26th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1.  int i;
  2.  int suma=0;
  3.  int max =0;
  4.  printf("ingrese numro max");
  5.  scanf("%i",&max);
  6.  for (i=0;i<=max;i++){
  7.     if(i%2==0){
  8.         suma = suma +i;
  9.     }
  10.  }
  11.  printf(" su suma es %i",suma);
  12.  
  13.     return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement