#编写如下代码,以ps1结尾 for ($a = 1; $a -le 9; ++$a) { for ($b = 1; $b -le $a; ++$b) { Write-Host -NoNewline "$b*$a=$($a*$b)`t" } Write-Host }
执行脚本:powershell -ExecutionPolicy ByPass -File “e:\vscode-project\test\test.ps1”
#编写如下代码,以ps1结尾 for ($a = 1; $a -le 9; ++$a) { for ($b = 1; $b -le $a; ++$b) { Write-Host -NoNewline "$b*$a=$($a*$b)`t" } Write-Host }
执行脚本:powershell -ExecutionPolicy ByPass -File “e:\vscode-project\test\test.ps1”