uses crt; var rez,mas:array[0..24] of string; tmpstr:string; error,i,j,n,k_o,n_gl,n_so,ch1,ch2:integer; accle,chg:boolean; engrusnum,hndlord1,hndlord2:byte; Label L1,L2; begin L1: clrscr; repeat gotoxy(4,10); textattr:=white; write('Введите кол-во строк исходного массива  (любое целое число от 1 до 25) :'); {$i-} readln(N); error:=ioresult; clrscr; {$i+} if (N<1) or (N>25) or (error<>0) then begin clrscr; gotoxy(18,12); writeln('Размерность задана неправильно!'); gotoxy(30,14); writeln('Повторите ввод!'); end; until (N>=1) and (N<=25) and (error=0); for i:=0 to N-1 do begin repeat gotoxy(14,10); write('Введите слово(не более 10 символов) № ',I+1,':'); {$i-} readln(mas[i]); accle:=true; error:=ioresult; clrscr; {$i+} if (length(mas[i])>10) or (length(mas[i])=0) then begin accle:=false; gotoxy(14,12); writeln('Длина слова не удовлетворяет условию!'); end else begin for j:=1 to length(mas[i]) do if (ord(mas[i][j])<48) or ((ord(mas[i][j])>57) and (ord(mas[i][j])<65)) or ((ord(mas[i][j])>90) and (ord(mas[i][j])<97)) or ((ord(mas[i][j])>122) and (ord(mas[i][j])<128))or ((ord(mas[i][j])>175) and (ord(mas[i][j])<224)) or (ord(mas[i][j])>241) then begin accle:=false; gotoxy(14,12); writeln('В слове могут быть только буквы и числа!'); end else begin engrusnum:=0; for j:=1 to length(mas[i]) do begin if (ord(mas[i][j])>=48) and (ord(mas[i][j])<=57) then begin if engrusnum=0 then engrusnum:=3; end else begin if ((ord(mas[i][j])>=65) and (ord(mas[i][j])<=90)) or ((ord(mas[i][j])>=97) and (ord(mas[i][j])<=122)) then if engrusnum<>2 then engrusnum:=1 else begin accle:=false; gotoxy(5,12); writeln('В слове могуты быть только буквы одного алфавита(русского или английского!'); end else if engrusnum<>1 then engrusnum:=2 else begin accle:=false; gotoxy(5,12); writeln('В слове могуты быть только буквы одного алфавита(русского или английского!'); end; end; end; end; end; until (error=0) and (accle=true); end; clrscr; k_o:=0; for i:=0 to n-1 do begin engrusnum:=0; for j:=1 to length(mas[i]) do if (ord(mas[i][j])>=48) and (ord(mas[i][j])<=57) then if engrusnum=0 then engrusnum:=3 else else if ((ord(mas[i][j])>=65) and (ord(mas[i][j])<=90)) or ((ord(mas[i][j])>=97) and (ord(mas[i][j])<=122)) then engrusnum:=1 else engrusnum:=2; if engrusnum=3 then begin rez[k_o]:=mas[i]; k_o:=k_o+1; end; end; for i:=0 to n-1 do begin engrusnum:=0; for j:=1 to length(mas[i]) do if ((ord(mas[i][j])>=65) and (ord(mas[i][j])<=90)) or ((ord(mas[i][j])>=97) and (ord(mas[i][j])<=122)) then engrusnum:=1; if engrusnum=1 then begin rez[k_o]:=mas[i]; k_o:=k_o+1; end; end; for i:=0 to n-1 do begin engrusnum:=0; for j:=1 to length(mas[i]) do if (ord(mas[i][j])>=128) then engrusnum:=2; if engrusnum=2 then begin rez[k_o]:=mas[i]; k_o:=k_o+1; end; end; repeat for i:=1 to n-1 do begin chg:=false; engrusnum:=0; for j:=1 to length(rez[i]) do begin if ((ord(rez[i][j])>=65) and (ord(rez[i][j])<=90)) or ((ord(rez[i][j])>=97) and (ord(rez[i][j])<=122)) then engrusnum:=1; if ord(rez[i][j])>128 then engrusnum:=2; if ord(rez[i][j])<58 then if engrusnum=0 then engrusnum:=3; end; if engrusnum=1 then begin j:=0; repeat j:=j+1; if ord(rez[i][j])>=97 then hndlord1:=ord(rez[i][j])-32 else hndlord1:=ord(rez[i][j]); if (ord(rez[i-1][j])>=97) and (ord(rez[i-1][j])<=122) then hndlord2:=ord(rez[i-1][j])-32 else if (ord(rez[i-1][j])>=65) and (ord(rez[i-1][j])<=90) then hndlord2:=ord(rez[i-1][j]) else hndlord2:=hndlord1; until (hndlord1<>hndlord2) or (j=length(rez[i])); if hndlord1133) and (ord(rez[i][j])<160)) then hndlord1:=ord(rez[i][j])+1 else if (ord(rez[i][j])=240) or (ord(rez[i][j])=241) then hndlord1:=134 else if ((ord(rez[i][j])>159) and (ord(rez[i][j])<166)) then hndlord1:=ord(rez[i][j])-32 else if ((ord(rez[i][j])>165) and (ord(rez[i][j])<176)) then hndlord1:=ord(rez[i][j])-31 else if ((ord(rez[i][j])>223) and (ord(rez[i][j])<240)) then hndlord1:=ord(rez[i][j])-79; if (ord(rez[i-1][j])>127) and (ord(rez[i-1][j])<134) then hndlord2:=ord(rez[i-1][j]) else if ((ord(rez[i-1][j])>133) and (ord(rez[i-1][j])<160)) then hndlord2:=ord(rez[i-1][j])+1 else if (ord(rez[i-1][j])=240) or (ord(rez[i-1][j])=241) then hndlord2:=134 else if ((ord(rez[i-1][j])>159) and (ord(rez[i-1][j])<166)) then hndlord2:=ord(rez[i-1][j])-32 else if ((ord(rez[i-1][j])>165) and (ord(rez[i-1][j])<176)) then hndlord2:=ord(rez[i-1][j])-31 else if ((ord(rez[i-1][j])>223) and (ord(rez[i-1][j])<240)) then hndlord2:=ord(rez[i-1][j])-79 else hndlord2:=hndlord1; until (hndlord1<>hndlord2) or (j=length(rez[i])); if hndlord1=65) and (ord(rez[i][j])<=90)) or ((ord(rez[i][j])>=97) and (ord(rez[i][j])<=122)) then engrusnum:=1; if ord(rez[i][j])>128 then engrusnum:=2; if ord(rez[i][j])<58 then if engrusnum=0 then engrusnum:=3; end; if engrusnum=3 then begin n_gl:=0; n_so:=0; end else if engrusnum=1 then for j:=1 to length(rez[i]) do begin if ord(rez[i][j])>=97 then hndlord1:=ord(rez[i][j])-32 else hndlord1:=ord(rez[i][j]); if (hndlord1=65) or (hndlord1=69) or (hndlord1=73) or (hndlord1=79) or (hndlord1=85) or (hndlord1=89) then n_gl:=n_gl+1 else n_so:=n_so+1; end else for j:=1 to length(rez[i]) do begin if ord(rez[i][j])<=133 then hndlord1:=ord(rez[i][j]) else if ((ord(rez[i][j])>133) and (ord(rez[i][j])<160)) then hndlord1:=ord(rez[i][j])+1 else if (ord(rez[i][j])=240) or (ord(rez[i][j])=241) then hndlord1:=134 else if ((ord(rez[i][j])>159) and (ord(rez[i][j])<166)) then hndlord1:=ord(rez[i][j])-32 else if ((ord(rez[i][j])>165) and (ord(rez[i][j])<176)) then hndlord1:=ord(rez[i][j])-31 else if ((ord(rez[i][j])>223) and (ord(rez[i][j])<240)) then hndlord1:=ord(rez[i][j])-79; if (hndlord1=128) or (hndlord1=133) or (hndlord1=134) or (hndlord1=137) or (hndlord1=143) or (hndlord1=148) or (hndlord1=156) or (hndlord1>=158) then n_gl:=n_gl+1 else n_so:=n_so+1; end; gotoxy(48,i+3); write(n_gl); gotoxy(67,i+3); write(n_so); end; gotoxy(20,wherey+2); write('•®вЁвҐ «Ё ўл ®Ўа Ў®в вм ҐйҐ ®¤Ё­ ¬ ббЁў?(Y-„ , N-ЌҐв)'); L2: case readkey of #89:goto L1; #121:goto L1; #78:exit; #110:exit; else goto L2; end; end.