Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //https://imgur.com/a/N3WCZ7C
- Program fassakhDinOmmou;
- uses WinCrt;
- var
- s,t,rep : String;
- Procedure saisi(var s : String;ch: string);
- var
- a: Byte;
- begin
- repeat
- write(ch,': ');
- readln(s);
- a:=1;
- while (s[a] in ['a'..'z','#']) and (a<= Length( s)) do
- a:=a+1;
- Until a> Length(s);
- end;
- Function backspace(s: string): String;
- begin
- while pos('#',s) <> 0 do
- if pos('#',s) <>1 then
- delete(s,pos('#',s)-1,2)
- else
- delete(s,pos('#',s),1) ;
- backspace:=s;
- end;
- begin
- repeat
- saisi(t,'T');
- saisi(s,'S');
- if backspace(s)=backspace(t) then
- writeln('True')
- else
- writeln('False');
- readln(rep);
- until rep='o';
- End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement