|  | 
|  | 
| вернуться в форум | why its' wrong help me Послано olzii  19 мар 2007 14:49varb,a:array[1..100] of string;
 x,l,w,n,i,j:integer;
 begin
 assign(input,'fac.in');reset(input);
 assign(output,'fac.out');rewrite(output);
 readln(n);
 for i:=1 to n do
 readln(a[i]);
 for i:=1 to n do
 for j:=i+1 to n do
 begin
 if (a[i]=a[j]) and (a[i]<>'0') and (a[j]<>'0') then
 begin
 x:=x+1;
 b[x]:=a[i];
 for l:=1 to n do
 if b[x]=a[l] then a[l]:='0';
 end;
 end;
 for i:=1 to x do writeln(b[i]);
 
 close(input);close(output);
 end.
 
 Edited by author 19.03.2007 14:49
 | 
 | 
|