Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach my $line (@$arr) {
- my ($a, $b, $c, $d) = split(' ', $line);
- if ($a <= 0 || $b <= 0 || $c <= 0 || $d <= 0) {
- $others++;
- } elsif ($a == $c && $b == $d) {
- if ($a == $b) {
- $squares++
- } else {
- $rectangles++
- }
- } else {
- $others++
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement