|
|
back to boardwhat's the mater?????! pascal program Project1; {$APPTYPE CONSOLE} uses SysUtils; var s,s2:array[1..100] of string[30]; i,n,j,k:integer; begin readln(n); k:=1; for i:=1 to n do s2[i]:=''; for i:=1 to n do readln(s[i]); for i:=1 to n-1 do for j:=i+1 to n do if s[i] = s[j] then begin s2[k]:=s[i]; k:=k+1; end; for i:=1 to k-1 do for j:=i+1 to k do if s2[i] = s2[j] then s2[j]:=''; for i:=1 to k-1 do if s2[i] <> '' then writeln(s2[i]); end. Edited by author 21.01.2008 16:10 Edited by author 21.01.2008 16:10 |
|
|