So for rolling dice:
x=randi([1,6],1,2);
How do I write an if statement for the conditions that both dice (x(1) and x(2)) are not a 6 or 1. I did:
if x(1)~=6 if x(1)~=1 if x(2)~=1 if x(2) ~= 1 winnings=winnings+1 end end endend
But this is really ugly..
Best Answer