a = 1 b = 0 if (a) b = 1 else b = 0 done if (a+b) a = 0 b = 0 done