Advertisement
kostes

Untitled

Oct 17th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. var
  2. s:string;
  3. i:integer;
  4. begin
  5. readln(s);
  6. i:=1;
  7. while(i<=length(s)-1) do
  8. begin
  9. if(s[i]=s[i+1]) then
  10. begin
  11. delete(s,i,1);
  12. delete(s,i,1);
  13. end
  14. else inc(i);
  15. end;
  16. writeln(s);
  17. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement