Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int sum = 0;
- void main(){
- for(n=0; n<10; n++){
- if (n%3 = 0 || n%5=0){
- sum = sum + n;
- print n;
- }
- print sum;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement