use strict;
use warnings;
my ($x, $y, $z) = (-11,-13,4);
if ($x % 2 == 0 and $y % 2 == 0 and $z % 2 == 0) {
print "All are even numbers\n";
} elsif ($x % 2 == 0 && $y % 2 == 0) {
print "$z is the biggest odd number\n";
} elsif ($y % 2 == 0 && $z % 2 == 0) {
print "$x is the biggest odd number\n";
} elsif ($x % 2 == 0 && $z % 2 == 0) {
print "$y is the biggest odd number\n";
} elsif ($x % 2 == 0 && $y % 2 != 0 && $z % 2 != 0) {
if ($y > $z) {
print "$y is the greatest odd number\n";
} else {
print "$z is the biggest odd number\n";
}
} elsif ($y % 2 == 0 && $x % 2 != 0 && $z % 2 != 0) {
if ($x > $z) {
print "$x is the greatest odd number\n";
} else {
print "$z is the biggest odd number\n";
}
} elsif ($z % 2 == 0 && $x % 2 != 0 && $z % 2 != 0) {
if ($x > $y) {
print "$x is the greatest odd number\n";
} else {
print "$y is the biggest odd number\n";
}
} else {
if ($x > $y && $x > $z) {
print "$x is the biggest odd number\n";
} elsif ($y > $z) {
print "$y is the biggest odd number\n";
} else {
print "$z is the biggest odd number\n";
}
}
####
use strict;
use warnings;
my ($x, $y, $z) = (-11,-13,-17);
if ($x % 2 == 0 and $y % 2 == 0 and $z % 2 == 0) {
print "All are even numbers\n";
} elsif ($x % 2 == 0 && $y % 2 == 0) {
print "$z is the biggest odd number\n";
} elsif ($y % 2 == 0 && $z % 2 == 0) {
print "$x is the biggest odd number\n";
} elsif ($x % 2 == 0 && $z % 2 == 0) {
print "$y is the biggest odd number\n";
} elsif ($x % 2 == 0 && $y % 2 != 0 && $z % 2 != 0) {
if ($y > $z) {
print "$y is the greatest odd number\n";
} else {
print "$z is the biggest odd number\n";
}
} elsif ($y % 2 == 0 && $x % 2 != 0 && $z % 2 != 0) {
if ($x > $z) {
print "$x is the greatest odd number\n";
} else {
print "$z is the biggest odd number\n";
}
} elsif ($z % 2 == 0 && $x % 2 != 0 && $z % 2 != 0) {
if ($x > $z) {
print "$x is the greatest odd number\n";
} else {
print "$z is the biggest odd number\n";
}
} else {
if ($x > $y && $x > $z) {
print "$x is the biggest odd number\n";
} elsif ($y > $z) {
print "$y is the biggest odd number\n";
} else {
print "$z is the biggest odd number\n";
}
}
####