Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define ZERO 0
- #define THREE 3
- #define FIVE 5
- #define LIM 1000
- main()
- {
- int c, sum;
- sum = ZERO;
- for (c = THREE; c < LIM; c++)
- {
- if (c % THREE == ZERO || c % FIVE == ZERO)
- {
- sum += c;
- }
- }
- printf("%d", sum);
- }
Advertisement
Add Comment
Please, Sign In to add comment