Untitled
unknown
plain_text
3 years ago
854 B
6
Indexable
fun main (args:Array<String>) { var type = arrayListOf(String) var model = arrayListOf(String) var year = arrayListOf(Int) var kilo = arrayListOf(Double) var No_car = arrayListOf(Int) var x = 1 var i = 0 val kiloMM = Regex("([0-9]{1,7}") val yearx = Regex("[0-9]{1,4}\\d{4}") while ( x != 0 ) { var typex = "" var modelx = "" var kiloM = -1 println("enter the type of the car : " + (i + 1)) type.add(readLine()!!) println("enter the model of the car : " + (i + 1)) model.add(readLine()!!) println("enter the enter the model of the car " + (i + 1)) year.add(readLine()!!.toInt()) println("enter the enter the number of the car " + (i + 1)) No_car.add(readLine!!.toInt) }}
Editor is loading...