INNER CODE UNIT · Kotlin

subtotal

ArisGuimera/Android-Expert · CursoBasicoKotlin/src/main/kotlin/FunctionExample.kt:56

    val subtotal = price * quantity
    return subtotal
}

fun calculateShippingCost(subtotal: Double): Double {
    if (subtotal > 50) {
        return 0.0
    }
    return 4.99
}

fun example() {
    val a = 34
    require(a < 50)
    val b = a * a
    val c = a * a
    val d = a * a
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…