Var s: String; i: Integer; begin Writeln ('Введите строку: '); Readln (s); i: =0; while pos (') ', s) <> 0 do begin i: =i+pos (') ', s) — pos (' (', s)+1; delete (s, pos (' (', s) , pos (') ', s) — pos (' (', s)+1); end; Writeln (s); Writeln (i); Readln; end.2) var s: String; i, e: Integer; flag: Boolean; begin Writeln ('Введите строку: '); Readln (s); e: =0; flag: =False; for i: =1 to Length (s) do begin if (s[i]=UpCase (s[i]) and (s[i — 1]=') or (i=1) then flag: =True; if flag then Write (s[i]); if (s[i]=') or (i=Length (s) and flag then begin flag: =False; inc (e); Writeln; end; end; Writeln (e); Readln; end.