Write the code for the function printColorInt(). It reads 3 floats Red, Green, and Blue from stdin (separated by a space). These floats denote the 3 float color components of a Color instance. If any of these values is outside the range 0 to 1, then print Invalid input. Otherwise, create a Color instance and print the 3 color components as integers (separated by a space).
Image blending
Print Color with integers
Report a typo
Sample Input 1:
1.0 0.0 1.0Sample Output 1:
255 0 255Write a program in Kotlin
fun printColorInt() {
// Write 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.