I'm writing a code where I need a conditional statement something like the following:
x = 1;y = 2;if (((x || y == 1) && (x || y == 3))) || (((x || y == 2) && (x || y == 3)) fprintf('true');elsefprintf('false');end;
I tried this, but it keeps outputting "true", when I want it to output "false". I want it to say "If (x or y is 1) and (x or y is 3), or if (x or y is 2) and (x or y is 3), then…". But that clearly isn't what this is saying. Please help!
Best Answer