so when i write my code using ternery operators the complier is showing its wrong even though i got it correct here is my code pls help me ASAP
// Update the program below to solve the problem
int X, Y, Z;
scanf("%d %d %d", &X, &Y, &Z);
(X%Z==0 && Y%Z==0)?printf("ANY\n"):(Z%X==0)?printf("CHICKEN\n"):(Z%Y==0)?printf("DUCK\n"):printf("NONE\n");
Learning course: C for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone
one mistake it should be Z%X==0 and Z%Y==0 int ANY condition.