Есть ответ 👍

Micrasoft Word-ты қосу үшін мынандай әрекеттер тізбегін орындау керек

282
494
Посмотреть ответы 1

Ответы на вопрос:


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.

 

 

 

Популярно: Информатика