Advertisement
Varvara_Golovnova

Untitled

Sep 20th, 2024
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. var
  2. d1,d2 : longint;
  3. c1,c2 : char;
  4. s1 : string;
  5. begin
  6. readln(c1);
  7. readln(c2);
  8. readln(s1);
  9. d1:=pos(c1,s1);
  10. s1[d1]:=c2;
  11. d2:=pos(c1,s1);
  12. s1[d2]:='_';
  13. d2:=pos(c1,s1);
  14. s1[d2]:=c2;
  15. writeln(s1);
  16. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement