Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(int argc, char **argv) {
- int A,B;
- int sum=0;
- printf("A = ");
- scanf("%d",&A);
- printf("B = ");
- scanf("%d",&B);
- for(int x=A; x<=B; x++) {
- if(x <= 0) continue;
- if(x % 4 == 0) sum += x;
- }
- printf("%d\n",sum);
- return 0;
- }
Add Comment
Please, Sign In to add comment