Здесь Вы можете найти ответы на многие вопросы или задать свой вопрос!
pascal:
program strings;
uses crt;
var i,open,close: integer;
a: string;
begin
open: =0;
end: =0;
clrscr;
write('введите строку: '); readln(a);
for i: =1 to length(a) do
if a[i]='(' then open: =open+1;
if a[i]=')' then close: =close+1;
end;
writeln('открывающихся скобок: ', open, ' штук');
writeln('закрывающихся скобок: ', close, ' штук');
readln;
end.
2^i=n, n = 16
2^i=16
i=4 бит
50 * 4 = 200 бит
200: 8 = 25 байт
Популярные вопросы