Help for this page

Select Code to Download


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