Starting git repo for working on files

This commit is contained in:
sulzlep
2024-07-13 12:44:25 +02:00
commit d45a2994e8
20 changed files with 185 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
public class CMYKtoRGB
{
public static void main(String [] args){
double cyan = Double.parseDouble(args[0]);
double magenta = Double.parseDouble(args[1]);
double yellow = Double.parseDouble(args[2]);
double black = Double.parseDouble(args[3]);
double white = 1 - black;
double red = 255 * white * (1 - cyan);
double green = 255 * white * (1 - magenta);
double blue = 255 * white * (1 - yellow);
int decimal_red = (int) Math.round(red);
int decimal_green = (int) Math.round(green);
int decimal_blue = (int) Math.round(blue);
System.out.println("red = " + decimal_red);
System.out.println("green = " + decimal_green);
System.out.println("blue = " + decimal_blue);
}
}