Guest User

Untitled

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