Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int i=0, sum=0;
- for( i=1; i<1000; i++)
- {
- if(i%3 == 0)
- sum += i;
- if(i%5 == 0)
- sum += i;
- }
- System.out.println("The sum of 3 and 5 multiply numbers below 1000 is " + sum);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement