Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
29
Task/Balanced-brackets/EasyLang/balanced-brackets.easy
Normal file
29
Task/Balanced-brackets/EasyLang/balanced-brackets.easy
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
func balanced code$ .
|
||||
for i to len code$
|
||||
h$ = substr code$ i 1
|
||||
if h$ = "["
|
||||
br += 1
|
||||
elif h$ = "]"
|
||||
br -= 1
|
||||
.
|
||||
if br < 0
|
||||
return 0
|
||||
.
|
||||
.
|
||||
return if br = 0
|
||||
.
|
||||
repeat
|
||||
inp$ = input
|
||||
until inp$ = "eof"
|
||||
print inp$ & "\t" & balanced inp$
|
||||
.
|
||||
#
|
||||
input_data
|
||||
|
||||
[]
|
||||
[][]
|
||||
[[][]]
|
||||
][
|
||||
][][
|
||||
[]][[]
|
||||
eof
|
||||
Loading…
Add table
Add a link
Reference in a new issue