program CountLetters;
varstr: string;count: integer;i: integer;
begincount := 0;
writeln('Введите строку:');readln(str);
for i := 1 to length(str) dobeginif ((str[i] >= 'A') and (str[i] <= 'Z')) or ((str[i] >= 'a') and (str[i] <= 'z')) thencount := count + 1;end;
writeln('Количество букв латинского алфавита в строке: ', count);
end.
program CountLetters;
var
str: string;
count: integer;
i: integer;
begin
count := 0;
writeln('Введите строку:');
readln(str);
for i := 1 to length(str) do
begin
if ((str[i] >= 'A') and (str[i] <= 'Z')) or ((str[i] >= 'a') and (str[i] <= 'z')) then
count := count + 1;
end;
writeln('Количество букв латинского алфавита в строке: ', count);
end.