TOPIC

5% wrong answer

Luan Sabino asked 7 months ago

Im receiving a error, and dont know how to discover what is wrong

fun main() {
    var a : Double = readLine()!!.toDouble().times(2)
    var b : Double = readLine()!!.toDouble().times(3)
    var c : Double = readLine()!!.toDouble().times(5)
    var str : String = String.format((a.plus(b.plus(c))).div(10.0).toString())

    println("MEDIA = $str")
}

Remember not post solutions. Your post may be reviewed by our moderators.

  • Rodrigo Lorandi replied 7 months ago

    I don´'t know this language but it seens you didn't round to 1 decimal place