You have been given an integer number. You need to print two values. The first one should be the original number incremented by two. For the second value, you need to coerce the original number to a double and take a square root from it.
Integers in action
Increment and square root manipulation
Report a typo
Sample Input 1:
10Sample Output 1:
12
3.1622776601683795Sample Input 2:
4Sample Output 2:
6
2.0Write a program in Kotlin
import java.util.*
import kotlin.math.sqrt
fun main(args: Array<String>) {
val scanner = Scanner(System.`in`)
val number = scanner.nextInt()
// Write your code here
}'
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.