Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {Волкович Максим (volkovcih.maksim.s@gmail.com), 112гр., v1.0,
- дан текст из маленьких латинских букв. Вывести все буквы, встречающиеся не менее 2х раз}
- program t_14_27_b_v1 (input,output);
- var st,st2: set of 'a'..'z'; c:char;
- begin
- st:=[];
- st2:=[];
- read(c);
- while c<>'.' do begin
- if not(c in st) then begin st:=st+[c]; read(c); end;
- if (c in st) and (not(c in st2)) then begin st2:=st2+[c]; write(c); read(c); end;
- if (c in st) and (c in st2) then read(c);
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement