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
My code
// Update the program below to solve the problem
#include <stdio.h>
int main()
{
int t;
scanf("%d", &t);
while (t--)
{
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");
}
return 0;
}
Learning course: C for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone