program qwe;
uses crt;
var
s: string;
i, j, sum_p, sum_u: integer;
begin
clrscr;
write('VVedite stroku: ');
readln(s);
i:=ord(s[0]);
for j:=1 to i do
begin
if ord(s[j])=43 then sum_p:=sum_p+1;
if ord(s[j])=42 then sum_u:=sum_u+1;
end;
writeln('znakov + v stroke - ',sum_p);
writeln('znakov * v stroke - ',sum_u);
readkey;
end.
|