using System.Collections;
using static System.Console;
public class program
{
static void Main()
{
string[] a = { "There are two boys in the tree.","I am Daniel.","I am Li Lei.","How do you do?","Can I help you?" };
Stack s1 = new Stack(a.Length);
Stack s2 = new Stack(a.Length);
foreach (string aa in a)
{
s1.Push(aa);
}
s2.Push(s1.Pop());
ChangeAndMove(ref s1, ref s2);
while (s2.Count > 0)
Write(s2.Pop() + "\n");
ReadKey();
}
static void ChangeAndMove(ref Stack s1, ref Stack s2)
{
Comparer comparer = new Comparer(System.Globalizatio
using static System.Console;
public class program
{
static void Main()
{
string[] a = { "There are two boys in the tree.","I am Daniel.","I am Li Lei.","How do you do?","Can I help you?" };
Stack s1 = new Stack(a.Length);
Stack s2 = new Stack(a.Length);
foreach (string aa in a)
{
s1.Push(aa);
}
s2.Push(s1.Pop());
ChangeAndMove(ref s1, ref s2);
while (s2.Count > 0)
Write(s2.Pop() + "\n");
ReadKey();
}
static void ChangeAndMove(ref Stack s1, ref Stack s2)
{
Comparer comparer = new Comparer(System.Globalizatio