Exemple #1
0
Fichier : F.cs Projet : nAglTI/pr1
        public F(int n)
        {
            var stack = new MyStack <int>(n);
            int num   = n;

            while (stack.Count() != n)
            {
                if (num > 0)
                {
                    stack.Push(num--);
                    Console.WriteLine(stack.Peek());
                }
            }
            while (!stack.IsEmpty())
            {
                Console.WriteLine(stack.Pop().ToString());
            }
        }
Exemple #2
0
 private void btnCount_Click(object sender, EventArgs e)
 {
     tbCount.Text = ms.Count().ToString();
 }