Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- unsigned short i;
- unsigned int sum = 0;
- for(i = 0; i < 1000; ++i)
- {
- if(i % 3 == 0 || i % 5 == 0)
- {
- sum = sum + i;
- }
- }
- printf("%d\n", sum);
- getch();
- return 0;
- }
Add Comment
Please, Sign In to add comment