Ответ:
var st: string;
n, k: integer;
begin
writeln('Введите текст');
readln(st);
n := length(st);
k := 1;
for var i := 1 to n do
if (st[i] = '.') or (st[i] = '?') or (st[i] = '!') then
k := k + 1;
end;
writeln('В тексте ', k, ' предложения(-ий)');
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
var st: string;
n, k: integer;
begin
writeln('Введите текст');
readln(st);
n := length(st);
k := 1;
for var i := 1 to n do
begin
if (st[i] = '.') or (st[i] = '?') or (st[i] = '!') then
k := k + 1;
end;
writeln('В тексте ', k, ' предложения(-ий)');
end.