Skip to content

Instantly share code, notes, and snippets.

@AndreyLif
AndreyLif / gist:aef80d9f59fc1d1ee347c9a8204d6c60
Created August 24, 2025 20:55
ООП_Колода карт
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
Сroupier сroupier = new();
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
Administrator menu = new();
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
Player player = new Player(10, 10, '@');
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
Player hunter = new Player("Кро-Кро", 987, 123.7f);
@AndreyLif
AndreyLif / gist:7bf75db8941a94d2ef92ee00967f59a7
Created November 5, 2024 12:48
Степень двойки
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
Random random = new Random();
int firstNumberSequence = 1;
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
int lowerBoundSequence = 50;
int upperBoundSequence = 150;
@AndreyLif
AndreyLif / gist:0a6a973dd50e8a081eed3d6d571fcd71
Last active May 27, 2025 08:54
Объединение коллекций с исключением повторений
namespace Work_5_Обьединение;
class Program
{
static void Main(string[] args)
{
int[] firstArray = new int[8] { 112, 22, 34, 55, 11, 22, 22, 22 };
int[] secondArray = new int[7] { 113, 22, 35, 56, 11, 23, 144 };
List<int> temporaryCollection = new List<int>();
@AndreyLif
AndreyLif / gist:135658bbf358d51bfb6e7fc98c2e366f
Last active May 23, 2025 22:10
Кадровый учет продвинутый
class Program
{
static void Main(string[] args)
{
Dictionary<string, List<string>> dossiers = new();
const string CommandAddDossier = "1";
const string CommandDeleteDossier = "2";
const string CommandShowAllDossier = "3";
const string CommandExit = "4";
@AndreyLif
AndreyLif / gist:b9c04161f6e2acfed3de4a7d7408bfea
Last active May 6, 2025 20:51
Динамический массив продвинутый
class Program
{
static void Main(string[] args)
{
const string CommandExit = "Выход";
const string CommandSumAllNumbers = "Sum";
List<int> userNumbers = new List<int>();
bool isWork = true;
@AndreyLif
AndreyLif / gist:cc2b0878faa1d1ebd498aefd78171667
Last active April 19, 2025 20:03
Очередь в магазине
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Queue<int> buyers = new Queue<int>();