Write a program that reads a color name, e.g. black or orange, and prints true if this color is in rainbow. Otherwise, print false.
Computer scienceProgramming languagesKotlinObject-oriented programmingObject-oriented programming usage
Enum
Rainbow colors
Report a typo
Sample Input 1:
blueSample Output 1:
trueSample Input 2:
whiteSample Output 2:
falseWrite a program in Kotlin
fun main() {
// put your code here
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
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.