RosettaCodeData/Task/Balanced-brackets/PowerShell/balanced-brackets-2.ps1
2026-04-30 12:34:36 -04:00

8 lines
229 B
PowerShell

# Test
$Strings = @( "" )
$Strings += 1..5 | ForEach { ( [char[]]("[]" * $_) | Get-Random -Count ( $_ * 2 ) ) -join "" }
ForEach ( $String in $Strings )
{
$String.PadRight( 12, " " ) + (Get-BalanceStatus $String)
}