Adding five to a number, then doubling it

Report a typo

Write a Kotlin program that reads an integer n from the standard input using the Scanner class. The program should add five to the read number and then multiply it by 2. Print the final result in the standard output.

Sample Input 1:

5

Sample Output 1:

20

Sample Input 2:

7

Sample Output 2:

24
Write a program in Kotlin
import java.util.Scanner

fun main(args: Array<String>) {
// TODO: Use the nextInt() method of the Scanner class to read an integer from the standard input.

// Then, add five to the read number and multiply the result by two.

// Finally, print the result of the multiplication to the standard output.
}'

Create a free account to access the full topic