Given a line ending with a dot, count how many words with three letters in a line PASCAL

program zz1;
var s: string; // set a variable of string type
i, k, l: integer; // set a variable of integer type
begin
write (‘enter string’);
read (s); // enter a string from the keyboard
s: = ” + s; // add a space to the beginning of the line
for i: = 1 to length (s) do
begin
if (s [i] = ”) and (s [i + 1] <> ”) and (s [i + 1] <> ‘.’) then
l: = i + 1;
if (s [i] <> ”) and (s [i] <> ‘.’) and ((s [i + 1] = ‘.’) or (s [i + 1] = ”)) then
begin
k: = i;
if ((k-l) + 1 = 3) then writeln (copy (s, k-2,3)); // check if the space between spaces is three letters, then display the word on the screen
end;
end;
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.