21 lines
381 B
Kotlin
21 lines
381 B
Kotlin
package foo
|
|
|
|
fun box(): Boolean {
|
|
val c: Double = 3.6
|
|
if (c.toDouble() != 3.6) {
|
|
return false
|
|
}
|
|
if (c.toFloat() != 3.6.toFloat()) {
|
|
return false
|
|
}
|
|
if (c.toByte() != 3.toByte()) {
|
|
return false
|
|
}
|
|
if (c.toInt() != 3) {
|
|
return false
|
|
}
|
|
if (c.toShort() != 3.toShort()) {
|
|
return false
|
|
}
|
|
return true
|
|
} |