RosettaCodeData/Task/Balanced-brackets/Scilab/balanced-brackets-2.scilab

15 lines
200 B
Text
Raw Permalink Normal View History

2017-09-23 10:01:46 +02:00
for j=[5 16 22]
s=[];
for i=1:j
p=rand();
if p>0.5 then
s=s+"[";
else
s=s+"]";
end
end
disp(s);
x=isbb(s);
disp(x);
end