Balanced brackets: Difference between revisions

Content added Content deleted
Line 2,832: Line 2,832:
Print(TestString$)
Print(TestString$)
If Balanced(TestString$)
If Balanced(TestString$)
PrintN(" is ballanced.")
PrintN(" is balanced.")
Else
Else
PrintN(" is not ballanced")
PrintN(" is not balanced")
EndIf
EndIf
Next</lang>
Next</lang>
Output sample
Output sample
<pre>
[] is ballanced.
[[]] is ballanced.
[] is balanced.
[[[]]] is ballanced.
[[]] is balanced.
[][]]][[ is not ballanced
[[[]]] is balanced.
[][][][]][ is not ballanced
[][]]][[ is not balanced
[][][][]][ is not balanced
</pre>


=={{header|Python}}==
=={{header|Python}}==