Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.10 KB | None | 0 0
  1. def maximum(arr)
  2. #arr.max
  3. y = 0
  4. arr.each do |x|
  5. if y < x
  6. y = x
  7. end
  8. end
  9. y
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement