Created
October 19, 2023 12:22
-
-
Save alexaleluia12/5fa6110c580f6fee86c330253fdff0a2 to your computer and use it in GitHub Desktop.
Google PlayGround
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
fun main() { | |
val morningNotification = 51 | |
val eveningNotification = 135 | |
printNotificationSummary(morningNotification) | |
printNotificationSummary(eveningNotification) | |
} | |
fun printNotificationSummary(numberOfMessages: Int) { | |
val notificationMessage = when { | |
numberOfMessages >= 100 -> "Your phone is blowing up! You have 99+ notifications." | |
else -> "You have $numberOfMessages notifications" | |
} | |
println(notificationMessage) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment