+ 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

4th Nov 2022, 6:00 AM
Malachite
Malachite - avatar
7 Answers
+ 2
Where is full task description? add it pls.. What your if blocks do according to your expectations?
4th Nov 2022, 8:10 AM
Jayakrishna 🇼🇳
+ 2
Order of input cin >> C >> M >> Y>> K; Try Apply only *round* to all results. no need of if blocks I actually..
4th Nov 2022, 8:31 AM
Jayakrishna 🇼🇳
+ 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
4th Nov 2022, 8:16 AM
Malachite
Malachite - avatar
+ 1
The if blocks are just too make sure input values are within the scope of the cymk values
4th Nov 2022, 8:18 AM
Malachite
Malachite - avatar
+ 1
Thank you. I think that would solve it
4th Nov 2022, 8:36 AM
Malachite
Malachite - avatar
0
Malachite where's the code?
13th Nov 2022, 4:19 AM
sen
0
Not sure. Looks like the link broke. But I got it solved anyway
13th Nov 2022, 4:25 AM
Malachite
Malachite - avatar