Advertisement
volkovich_maksim

t_14_27_б_v1_volkovich

Nov 16th, 2015
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.58 KB | None | 0 0
  1. {Волкович Максим (volkovcih.maksim.s@gmail.com), 112гр., v1.0,
  2. дан текст из маленьких латинских букв. Вывести все буквы, встречающиеся не менее 2х раз}
  3. program t_14_27_b_v1 (input,output);
  4. var st,st2: set of 'a'..'z'; c:char;
  5. begin
  6.    st:=[];
  7.    st2:=[];
  8.    read(c);
  9.    while c<>'.' do begin
  10.      if not(c in st) then begin st:=st+[c]; read(c); end;
  11.      if (c in st) and (not(c in st2)) then begin st2:=st2+[c]; write(c); read(c); end;
  12.      if (c in st) and (c in st2) then read(c);
  13.    end;  
  14. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement