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 Pop()
{
int a = tablica[0];
int[] temp = new int[ile - 1];
for (int i = 1; i < ile; i++) temp[i - 1] = tablica[i];
ile--;
tablica = temp;
}
public void Show()
{
for (int i = 0; i < ile; i++) Console.WriteLine(tablica[i]);
}
public void dlugosc()
{
Console.WriteLine("kolejka jest dlugosci: "+ ile);
}
}
class Stos
{
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 Pop(int x)
{
int[] nowa = new int[ile-1];
for (int i = 0; i < ile-1; i++) nowa[i] = tablica[i];
tablica = nowa;
ile--;
}
public void Show()
{
for (int i = 0; i < ile; i++) Console.WriteLine(tablica[i]);
}
public void dlugosc()
{
Console.WriteLine("Stos jest dlugosci: " + ile);
}
}
class Program
{
static void Main(string[] args)
{
Kolejka kolejka = new Kolejka();
kolejka.Push(5);
kolejka.Push(3);
kolejka.Push(4);
kolejka.Push(1);
kolejka.Pop();
kolejka.Show();
Console.ReadKey();
}
}
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}