Advertisement
Guest User

Untitled

a guest
Aug 6th, 2010
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.13 KB | None | 0 0
  1. int sum = 0;
  2.  
  3. void main(){
  4.     for(n=0; n<10; n++){
  5.         if (n%3 = 0 || n%5=0){
  6.             sum = sum + n;
  7.             print n;
  8.         }
  9.     print sum;
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement