Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def maximum(arr)
- #arr.max
- y = 0
- arr.each do |x|
- if y < x
- y = x
- end
- end
- y
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement