Ответы на вопрос:
program stroka
uses сrt; var s,temp: string; i,c,k,d: integer; begin clrscr; write('введите строку: '); readln(s); write('введите длину: '); readln(k); temp: =''; c: =0;
d: =length(s); for i: =1 to d do begin if s[i]< > ' ' then temp: =temp+s[i]; if ((s[i]=' ') or (i=d)) and (temp< > '') then begin if length(temp)=k then c: =c+1; temp: =''; end;
end; writeln('количество слов заданной длины: ',c);
readkey; end.
Популярно: Информатика
-
50АлисА0515.04.2020 23:06
-
anna2003200410.01.2022 08:13
-
СНЕЖНАЯКОРОЛЕВА1126.01.2022 16:07
-
astashkin22223.02.2021 20:51
-
aandrey33603.06.2023 02:39
-
cfr102.12.2022 17:08
-
bananchik921.01.2023 23:21
-
SAMAWHICE05.11.2020 00:41
-
plore16.06.2021 09:21
-
Danielllllllll04.05.2021 07:38