// PascalABC.NET 3.1, сборка 1201 от 18.03.2016 begin var s1:=new Stack<integer>; var s2:=new Stack<integer>; foreach var e in Range(1,10) do s1.Push(e); s1.Println; foreach var e in Range(20,25) do s2.Push(e); s2.Println; foreach var e in s2.Reverse do s1.Push(e); s1.Println end.
begin
var s1:=new Stack<integer>;
var s2:=new Stack<integer>;
foreach var e in Range(1,10) do s1.Push(e);
s1.Println;
foreach var e in Range(20,25) do s2.Push(e);
s2.Println;
foreach var e in s2.Reverse do s1.Push(e);
s1.Println
end.
Тестовое решение:
10 9 8 7 6 5 4 3 2 1
25 24 23 22 21 20
25 24 23 22 21 20 10 9 8 7 6 5 4 3 2 1