Guest User

Untitled

a guest
Apr 25th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. program prog1136(input,output);
  2. const s=' ';
  3. type str=packed array [1..6] of char;
  4. var c1:char;w1,w2,w:str;
  5. procedure readword(var w:str);
  6. var c:char;i:integer;
  7. begin
  8. read(c);i:=1;
  9. while (c<>',') and (c<>'.') do begin
  10. w[i]:=c; i:=i+1; read(c); end;
  11. c1:=c;
  12. end;
  13. begin
  14. readword(w);w1:=w;w2:=s;
  15. while c1<>'.' do begin
  16. readword(w); if w2<>s then if w2=w then write(w1,' '); w2:=w1; w1:=w;
  17. end;
  18. end.
Add Comment
Please, Sign In to add comment