Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // kotlin solution to codeabbey challenge 15
- fun main(args: Array<String>) {
- var arr = readLine()!!.split(" ").map { it.toInt() }
- var RSP = IntArray(300)
- var max = 0
- var min = 0
- for (i in 0 until 300){
- RSP[i] = arr[i]
- }
- for (j in 0 until 300){
- if(RSP[j] > max){
- max = RSP[j]
- }else if(RSP[j] < min){
- min = RSP[j]
- }
- }
- println("$max $min")
- }
Add Comment
Please, Sign In to add comment