Assigning and printing different numeric types

Report a typo

In Kotlin language, variables are used to store values. Given code has few missing parts, all you have to do is fill the blanks in the code. The code already initializes variables of different datatypes. Fill the blanks to correctly define the data types and assign values of Byte, Short, Int and Long data types. Check, if all values are successfully assigned, by printing them onto the console.

Fill in the gaps with the relevant elements
fun main() {
    val myByte:  = 10
    val myShort:  = 500
    val myInt:  = 10000
    val myLong:  = 100000L
    val myFloat: Float = 99.99F
    val myDouble: Double = 999.999
    val myBoolean: Boolean = true
    val myChar: Char = 'A'
    val myString: String = "Hello, Kotlin!"
    
    println("Byte value: $myByte")
    println("Short value: $myShort")
    println("Int value: $myInt")
    println("Long value: $myLong")
    println("Float value: $myFloat")
    println("Double value: $myDouble")
    println("Boolean value: $myBoolean")
    println("Char value: $myChar")
    println("String value: $myString")
}
ShortLongByteInt

Create a free account to access the full topic