how to Calculate Percentage in Kotlin syntax?
Most likely you're struggling with the fact that applying the division operator on two integers will result in an integer division being performed, yielding an integer result.
Trick is to promote one of the operands to a floating point type:
var percentage = (count.toDouble() / totalCount) * 100