Skip to content

Instantly share code, notes, and snippets.

View Strelok78's full-sized avatar

Shota Strelok78

  • Saint-Petersburg, Russia
View GitHub Profile
@Strelok78
Strelok78 / iJunior_C#_Lesson_38
Last active April 29, 2025 11:03
get max value in two dimensional array and replace with zero
using System.Collections;
using System.Diagnostics;
using System.Text;
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
@Strelok78
Strelok78 / iJunior_C#_Lesson_37
Last active April 28, 2025 14:19
get first line multiple and sum second line in two dimensional array of int
using System;
namespace iJuniorPractice
{
class Program
{
static void Main(string[] args)
{
int[,] numbers =
{
@Strelok78
Strelok78 / iJunior_C#_Lesson_36
Last active April 25, 2025 12:27
Concat two string arrays into one collection without duplicates
using System.Collections;
using System.Diagnostics;
using System.Text;
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
using System.Collections;
using System.Diagnostics;
using System.Text;
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
@Strelok78
Strelok78 / iJunior_C#_Lesson_34
Last active April 23, 2025 13:43
Get sum of entered values using List collection
using System.Collections;
using System.Diagnostics;
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
const string SumCommand = "Sum";
@Strelok78
Strelok78 / iJunior_C#_Lesson_33
Last active April 23, 2025 12:09
Dequeue the queue in shop and calculate balance
using System.Collections;
using System.Diagnostics;
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
Queue<int> paymentsInQueue = new Queue<int>(new []{100, 25, 10, 50, 75});
@Strelok78
Strelok78 / iJunior_C#_Lesson_32
Last active April 22, 2025 16:35
Vocabulary
using System.Collections;
using System.Diagnostics;
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
const string ExitCommand = "Выход";
@Strelok78
Strelok78 / iJunior_C#_Lesson_31
Last active April 21, 2025 15:19
Boss fight
using System.Collections;
using System.Diagnostics;
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
const int PlayerBaseAttack = 1;
@Strelok78
Strelok78 / iJunior_C#_Lesson_30
Last active April 21, 2025 13:24
get power of two that bigger then random value (without Math.Pow operations)
using System.Diagnostics;
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
Random random = new Random();
int baseDegree = 2;
@Strelok78
Strelok78 / iJunior_C#_Lesson_29
Last active April 21, 2025 13:22
get multiple numbers to a random value in between values (without "*", "/" or "%")
using System.Diagnostics;
namespace iJuniorPractice;
class Program
{
static void Main(string[] args)
{
int multipleMinValue = 10;
int multipleMaxValue = 25;