Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace sklad2
- {
- class Program
- {
- static void Main(string[] args)
- {
- Stack<int> skl = new Stack<int>();
- Stack<int> skl2 = new Stack<int>();
- int število;
- skl.Push(0);
- skl.Push(1);
- skl.Push(2);
- skl.Push(3);
- skl.Push(4);
- skl.Push(5);
- skl.Push(6);
- skl.Push(7);
- skl.Push(8);
- for (int i = 0; i < skl.Count(); i++)
- {
- if (i % 2 == 0)
- {
- skl.Peek();
- skl.Clear();
- }
- }
- /*if (i % 2 == 0)
- {
- s.Peek();
- s.Clear();
- }*/
- foreach (int i in skl)
- {
- število = skl.Peek();
- Console.ReadLine(število);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement