Guest User

Untitled

a guest
Jul 17th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char **argv) {
  4.  
  5. int A,B;
  6. int sum=0;
  7.  
  8. printf("A = ");
  9. scanf("%d",&A);
  10. printf("B = ");
  11. scanf("%d",&B);
  12.  
  13. for(int x=A; x<=B; x++) {
  14. if(x <= 0) continue;
  15. if(x % 4 == 0) sum += x;
  16. }
  17.  
  18. printf("%d\n",sum);
  19. return 0;
  20. }
Add Comment
Please, Sign In to add comment