Fractional part

Report a typo

Write a program that reads a positive real number and outputs its first digit after the decimal point.

Input: one number of type Double.

Output: one number of type Int.

See functions of math to transform the result to Int

Sample Input 1:

1.79

Sample Output 1:

7
Write a program in Kotlin
import kotlin.math.*

fun main() {
// put your code here
}
___

Create a free account to access the full topic