Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.2 kB
7
Indexable
Never
fun main (args:Array<String>) {


    var no3 = arrayListOf<String>()
    var model = arrayListOf<String>()
    var sanh = arrayListOf<Double>()
    var s3r = arrayListOf<Double>()
    var adaid = arrayListOf<Double>()
    var hykl = hashMapOf<Int,String>()



    var a = 0
    var b = 0
    var q = 0
    val no3_RE = Regex("([a-zA-Z0-]{2,25})")
    val sanh_RE = Regex("[0-9]{4}")

    println("Enter the number of cars:")
    a = readLine()!!.toInt()


    for (i in 1..a){
        println("Enter the car name $i:")
        var no3_RE =readLine()!!.toString()
        println("Enter the company name $i:")
        var model = readLine()!!.toString()
        println("Enter the car model $i:")
        var sanh_RE = readLine()!!.toDouble()
        println("Enter the price of the car $i:")
        var s3r =readLine()!!.toDouble()
        println("Enter the mileage $i:")
        var adaid = readLine()!!.toDouble()
        println("Enter the chassis number $i:")
        var hykl= readLine()!!.toInt()
    }

while (i >= b) {
    println("If you want to display all car data in the gallery, enter 0")
    var w = readLine()!!.toInt()

     when -> println("If you want to print the data of a car with it, enter the car number:")
}







}