Create RGBtoCMYK.java

 Type conversion and conditionals.   Several different formats are used to represent color. For example, the primary format for LCD displays, digital cameras, and web pages, known as the RGB format, specifies the level of red (R), green (G), and blue (B) on an integer scale from 0 to 255. The primary format for publishing books and magazines, known as the CMYK format, specifies the level of cyan (C), magenta (M), yellow (Y), and black (K) on a real scale from 0.0 to 1.0.

Write a program RGBtoCMYK.java that converts RGB to CMYK. Read three integers red, green, and blue from the command line, and print the equivalent CMYK values using these formulas:

    RGB to CMYK formula 

Hint. Math.max(x, y) returns the maximum of x and y.

    % java RGBtoCMYK 75 0 130       // indigo
    cyan    = 0.423076923076923
    magenta = 1.0
    yellow  = 0.0
    black   = 0.4901960784313726

If all three red, green, and blue values are 0, the resulting color is black, so you should output 0.0, 0.0, 0.0 and 1.0 for the cyan, magenta, yellow and black values, respectively.