//Robertas Jurkaitis, 8 grupe, 1 uzduotis, 7 variantas //Nuskaito intext.txt, surikiuoja abeceles tvarka tuos zodzius, kurie turi dvibalsius, isveda i outtext.txt program uzd1; type mas=array[1..1000] of string; //PATIKRINAM AR SIMBOLIS RAIDE function check(ch:char):boolean; var simboliai:string; n:integer; begin check:=TRUE; simboliai:=',.! ?:;()-'; for n:=0 to 9 do begin if simboliai[n]=ch then check:=FALSE; end; end; //NUSKAITOM procedure readz(var arr:mas; var wordnr:integer); var intext:text; ch:char; word:string; begin assign (intext ,'intext.txt'); reset (intext); wordnr:= 0; word:=''; while not EOF(intext) do begin read(intext, ch); if check(ch) {ar raide} then word:=concat(word, ch) else if word<>'' then //jei butu pora skiriamuju simboliu ish karto nepadarao, kad butu iretpiamas @nulinis@ zodis begin wordnr:=wordnr+1; arr[wordnr]:=word; word:= ''; end; end; close(intext); end; //SURIKIUOJAM procedure sortz(var arr:mas; wordnr:integer); var n, j:integer; temp:string; begin for n:=1 to wordnr do begin for j:=n+1 to wordnr do begin if arr[n]>arr[j] then begin temp:=arr[n]; arr[n]:=arr[j]; arr[j]:=temp; end; end; end; end; //PATIKRINAM IR SPAUSDINAM procedure checkprint(var arr:mas; wordnr:integer); var outtext:text; n, m, z:integer; balses:string; charas:char; begin assign(outtext, 'outtext.txt'); rewrite(outtext); balses:='AEIOUaeiou'; for n:=1 to wordnr do begin for m:=1 to length(arr[wordnr]) do begin for z:=0 to 9 do begin if balses[z]=arr[wordnr][m] then begin if balses[z]=arr[wordnr][m+1] then writeln(outtext, arr[wordnr]) else arr[wordnr]:=''; end; end; end; end; close(outtext); end; //goahkfakdhak var wordnr:integer; arr:mas; begin readz(arr, wordnr); writeln('Nuskaitem'); sortz(arr, wordnr); writeln('Surikiavom'); checkprint(arr, wordnr); writeln('Baigta'); readln(); end.