Guest User

Untitled

a guest
Feb 28th, 2014
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int suma=0;
  8. for (int i=1; i<1000; i++){
  9. if (i%3==0 || i%5==0){
  10. suma=suma+i;
  11. }
  12. }
  13. cout << suma;
  14. return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment