RosettaCodeData/Task/Get-system-command-output/Kotlin/get-system-command-output.kotlin
2023-07-01 13:44:08 -04:00

11 lines
235 B
Text

// version 1.0.6
import java.util.Scanner
fun main(args: Array<String>) {
val command = "cmd /c chcp"
val p = Runtime.getRuntime().exec(command)
val sc = Scanner(p.inputStream)
println(sc.nextLine())
sc.close()
}