New course! Every coder should learn Generative AI!
Try a free lesson0
How do I write in code if (x %(any number but x)==0) ?
1 Answer
+ 1
I think it would involve the ternary operator.
Maybe this?
if (x%(y!=x? y : x+1)==0)
Or this?
if ((y!=x? x%y : 1)==0)