Guest User

Untitled

a guest
Oct 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. unsigned short i;
  6. unsigned int sum = 0;
  7.  
  8. for(i = 0; i < 1000; ++i)
  9. {
  10. if(i % 3 == 0 || i % 5 == 0)
  11. {
  12. sum = sum + i;
  13. }
  14. }
  15.  
  16. printf("%d\n", sum);
  17. getch();
  18. return 0;
  19. }
Add Comment
Please, Sign In to add comment