- or download this
my @vector1 = ( 2, -4, 2 );
my @vector2 = ( 5, -3, -6);
- or download this
return unless $ct1 && $ct1 == $ct2 && $ct2 == $ct3;
- or download this
my $sum = 0;
foreach my $i ( 0 .. $#$x ){
$sum += $x->[$i] * $y->[$i] * $z->[$i];
}
return $sum;
- or download this
my $sum = 0;
$sum += $x->[$_] * $y->[$_] * $z->[$_] for 0 .. $#$x;
return $sum;