+ 1
My cymk to rgb code fails hidden test cases, anyone know what I'm not doing correctly?
Made a program to convert CYMK values to RGB. It passes most test cases but a hidden one fails. Not sure why. https://code.sololearn.com/cq3cqGU50VuP/?ref=app
7 odpowiedzi
+ 2
Where is full task description? add it pls..
What your if blocks do according to your expectations?
+ 2
Order of input
cin >> C >> M >> Y>> K;
Try Apply only *round* to all results.
no need of if blocks I actually..
+ 1
Task:
Given a color in CMYK format, output the corresponding RGB color.
Input Format:
4 decimal numbers in the range of [0, 1], representing Cyan, Magenta, Yellow and Black.
Output Format:
A string, representing the corresponding RGB color, each component separated by commas.
Sample Input:
0.4
0.49
0.552
0.36
Sample Output:
98,83,73
+ 1
The if blocks are just too make sure input values are within the scope of the cymk values
+ 1
Thank you. I think that would solve it
0
Malachite where's the code?
0
Not sure. Looks like the link broke. But I got it solved anyway