Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uses UStack;
- procedure Inp(var somestack: Stack);
- var
- symb: char;
- begin
- read(symb);
- while (symb <> '.') do
- begin
- somestack.Push(symb);
- read(symb);
- end;
- end;
- procedure Outp(somestack: Stack);
- begin
- while not (somestack.isEmpty) do
- write(somestack.pop);
- writeln; writeln;
- writeln('stack is empty');
- end;
- var
- mystack: Stack;
- begin
- writeln('type symbol sequence');
- writeln('note: to stop the input type point-symbol');
- writeln;
- mystack.Init;
- Inp(mystack);
- Outp(mystack);
- end.
Advertisement
Add Comment
Please, Sign In to add comment