If statement in algebra

181 Views Asked by At

Is there a form to if statement in algebra . Or a way to do it . For example Let X , y ,z be 3 numbers . (X is always less than y )

If X/y = 4/5 then z = 1 else z = 0 I thought of a way and it was an equation like that . (X/y-1) - (X mod y-1 )/y-1 It worked but some time y-n is negative so it does not work . So is there an alternative or an edit on this equation to do that Thanks in advance