Created
November 27, 2021 10:55
-
-
Save nbness2/2de3d7aa35335f5723e5b56cc1eb56a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val random = Random | |
val randomNumber = random.nextInt() | |
val sign = if (randomNumber > 0) { | |
"positive" | |
} else if (randomNumber < 0) { | |
"negative" | |
} else { | |
"zero" | |
} | |
println("Number is $sign") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment