Print Color with floats

Report a typo

Write the code for the function printColorFloat(). It reads 3 integers Red, Green, and Blue from stdin (separated by a space). These integers denote the 3 color components of a Color instance. If any of these values is outside the range 0 to 255, then print Invalid input. Otherwise, create a Color instance and print the 3 color components as floats (separated by a space).

Sample Input 1:

0 255 0

Sample Output 1:

0.0 1.0 0.0
Write a program in Kotlin
import java.awt.Color

fun printColorFloat() {
// Write your code here

//
}
___

Create a free account to access the full topic