using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp18 { class Kolejka { int[] tablica = new int[0]; int ile = 0; public void Push(int x) { int[] nowa = new int[ile + 1]; for (int i = 0; i < ile; i++) nowa[i] = tablica[i]; nowa[ile] = x; tablica = nowa; ile++; } public void Show() { for (int i = 0; i < ile; i++) Console.WriteLine(tablica[i]); } } class Program { static void Main(string[] args) { Kolejka kolejka = new Kolejka(); kolejka.Push(5); kolejka.Push(3); kolejka.Push(4); kolejka.Push(1); kolejka.Show(); Console.ReadKey(); } } }