32 lines
554 B
C#
32 lines
554 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Stack
|
|
{
|
|
internal class StackBooksOfArray
|
|
{
|
|
private Book[] arrayBooks = new Book[1000];
|
|
private int lenght = 0;
|
|
|
|
public Book pop()
|
|
{
|
|
lenght--;
|
|
return arrayBooks[lenght];
|
|
}
|
|
|
|
public void push(Book newBook)
|
|
{
|
|
arrayBooks[lenght] = newBook;
|
|
lenght++;
|
|
}
|
|
|
|
public void sort()
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|