$a =(Read-Host).Split() $b =(Read-Host).Split() $c =(Read-Host).Split() $d =(Read-Host).Split() $x=@() $y=@() $z=@() foreach($i in 0..2){ $x+=$b[$i]-$a[$i] $y+=$c[$i]-$a[$i] $z+=$d[$i]-$a[$i] } echo($x[0]) echo($y[1]) echo($z[2]) echo(($x[0]*$y[1]))