Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a=0
- i=0
- z=3
- x=5
- f=0
- b=0
- loop do
- i+=1
- if (i%z)==0
- a=a+i
- # p a
- elsif i>=1000
- break
- else
- next
- end
- end
- loop do
- f+=1
- if (f%x)==0
- b=b+f
- # p b
- elsif f>=1000
- break
- else
- next
- end
- end
- #a=a-i
- #b=b-f
- p a
- p b
- p a+b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement