in reply to One out of three ain't bad
my $only_one = 1 == ($x ? 1 : 0) + ($y ? 1 : 0) + ($z ? 1 :0); + my $only_one = 2 == (! $x) + (! $y) + (! $z); my $only_one = ($x || $y || $z) && (! ($x && $y)) && (! ($y && $z)) && + (! ($z && $x)); my $only_one = (! ($x && $y && $z)) && ($x ^ $y ^ $z);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: One out of three ain't bad
by QM (Parson) on Oct 23, 2005 at 19:52 UTC | |
by Anonymous Monk on Oct 23, 2005 at 23:54 UTC | |
by QM (Parson) on Oct 24, 2005 at 03:35 UTC | |
|
Re^2: One out of three ain't bad
by Anonymous Monk on Oct 23, 2005 at 19:02 UTC | |
by snowhare (Friar) on Oct 24, 2005 at 14:06 UTC |