The rainbow order

Report a typo

Write a program that reads a color name and prints the position of this color in the rainbow, starting with 1.

Sample Input 1:

red

Sample Output 1:

1

Sample Input 2:

orange

Sample Output 2:

2
Write a program in Kotlin
fun main() {
val color = readln()
// put your code here
}
___

Create a free account to access the full topic