Can anybody help why using the expression :
int x = ((2*b-c)%a) + ((2*b-c) < a) give different answer as compared to :
int x = ((2*b-c)%a!=0) + ((2*b-c) < a)
Problem reference : 1624B - Make AP
What I am trying is that x will be 0 if the 2*b-c is divisible by a and second condition is fulfilled (2*b-c < a) but the solution is accepted when I write a boolean expression and not when I directly use modulo value