//字符逆序--stack
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Stack<char> reverse = new Stack<char>();
char []a = Console.ReadLine().ToCharArray();
for (int i = 0; i < a.Length; i++)
{
reverse.Push(a[i]);
}
for (int i = 0; i < a.Length; i++)
{
Console.Write(reverse.Pop());
}
Console.ReadKey();
}
}
}
//字符连接--queue
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string[] s = { "12", "CBF", "Y%7" };
Queue<string> q = new Queue<string>();
foreach (var item in s)
{
q.Enqueue(item);
}
string result = "";
while (q.Count > 0)
{
result += q.Dequeue();
}
Console.WriteLine(result);
Console.ReadKey();
}
}
}