//Мне скучно, потому я пишу сомнительный код по примеру Эникея //PascalABC.NET 3.2 сборка 1318
Var s,t,snew,curr,add,currsave:string; i,j,flag:integer; begin readln(s); readln(t); //s=lowcase(s); t:=lowercase(t); while pos(' ',s)<>0 do begin flag:=0; curr:=copy(s,1,pos(' ',s)); currsave:=curr; if pos(t,lowercase(curr))<>0 then begin flag:=1; delete(curr,pos(t,lowercase(curr)),length(t)); for j:=1 to length(curr) do if ((curr[j]>='a') and (curr[j]<='я')) or ((curr[j]>='А') and (curr[j]<='Я')) or ((curr[j]>='a') and (curr[j]<='z')) or ((curr[j]>='A') and (curr[j]<='Z')) then flag:=0; end; if flag=1 then snew+=curr else snew+=currsave; delete(s,1,pos(' ',s)); end; curr:=s; currsave:=curr; flag:=0; if pos(t,lowercase(curr))<>0 then begin flag:=1; delete(curr,pos(t,lowercase(curr)),length(t)); for j:=1 to length(curr) do if ((curr[j]>='a') and (curr[j]<='я')) or ((curr[j]>='А') and (curr[j]<='Я')) or ((curr[j]>='a') and (curr[j]<='z')) or ((curr[j]>='A') and (curr[j]<='Z')) then flag:=0; end; if flag=1 then snew+=curr else snew+=currsave; writeln(snew); end.
Пример ввода: Который из всех котов кот съел мясо Пример вывода: Который из всех котов съел мясо
KosarinPotemkina1888
17.01.2020
Const m=5; n=6; var a:array[1..m,1..n] of integer; b:array[1..m] of integer; i,j,min:integer; begin Randomize; writeln('Исходный массив:'); for i:=1 to m do begin for j:=1 to n do begin a[i,j]:=random(50); write(a[i,j]:4); end; writeln; end; for i:=1 to m do begin min:=a[i,1]; for j:=2 to n do if a[i,j]<min then min:=a[i,j]; b[i]:=min; end; writeln('Полученный массив:'); for i:=1 to m do write(b[i]:4); writeln; end.
Решение прикреплено в виде файла.