0

How do I write in code if (x %(any number but x)==0) ?

27th Feb 2022, 9:52 PM
Maram Jamal
3 Answers
+ 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)
28th Feb 2022, 4:07 AM
Brian
Brian - avatar