Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- lua solution to codabbey challenge 15
- function split(s, delimiter)
- result = {};
- for match in (s..delimiter):gmatch("(.-)"..delimiter) do
- table.insert(result, match);
- end
- return result;
- end
- inp = split(io.read(), " ")
- arr = {}
- for k, v in pairs(inp) do
- table.insert(arr,tonumber(v))
- end
- table.sort(arr)
- print(arr[#arr], arr[1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement