Skip to content

Instantly share code, notes, and snippets.

@Pekcapeh
Pekcapeh / IJunior C# home work 27: max deep
Last active September 12, 2025 15:40
IJunior C# home work 27: max deep
using System;
class Program
{
static void Main()
{
char leftBorder = '(';
char rightBorder = ')';
bool isCorrect = true;
@Pekcapeh
Pekcapeh / IJunior C# home work 26: shift array
Last active September 11, 2025 14:47
IJunior C# home work 26: shift array
using System;
class Program
{
static void Main()
{
int[] numbers = { 1, 2, 3, 4 };
for (int i = 0; i < numbers.Length; i++)
{
@Pekcapeh
Pekcapeh / IJunior C# home work 25: split
Created September 7, 2025 13:31
IJunior C# home work 25: split
using System;
class Program
{
static void Main()
{
string text = "C# является современным объектно ориентированным языком программирования";
string[] words = text.Split(new char[] { ' ' });
Console.WriteLine("Массив слов:");
@Pekcapeh
Pekcapeh / IJunior C# home work 24: sort
Created September 7, 2025 11:57
IJunior C# home work 24: sort
using System;
class Program
{
static void Main()
{
int arrayLength = 10;
int minValue = 0;
int maxValue = 9;
int[] numbers = new int[arrayLength];
@Pekcapeh
Pekcapeh / IJunior C# home work 23: max repeats
Created September 7, 2025 02:49
IJunior C# home work 23: max repeats
using System;
class Program
{
static void Main()
{
int arrayLength = 30;
int minValue = 0;
int maxValue = 10;
int[] numbers = new int[arrayLength];
@Pekcapeh
Pekcapeh / IJunior C# home work 22: sum array
Created September 3, 2025 04:53
IJunior C# home work 22: sum array
using System;
class Program
{
static void Main()
{
string exitCommand = "exit";
string sumCommand = "sum";
int[] numbers = new int[0];
@Pekcapeh
Pekcapeh / IJunior C# home work 21: local max
Created September 2, 2025 13:27
IJunior C# home work 21: local max
using System;
class Program
{
static void Main()
{
int arraySize = 30;
int[] numbers = new int[arraySize];
Random random = new Random();
@Pekcapeh
Pekcapeh / IJunior C# home work 20: max number
Created September 2, 2025 05:55
IJunior C# home work 20: max number
using System;
class Program
{
static void Main()
{
int rows = 10;
int columns = 10;
int[,] matrixA = new int[rows, columns];
@Pekcapeh
Pekcapeh / IJunior C# home work 19: rowSum and columnProduct
Created September 1, 2025 13:33
IJunior C# home work 19: rowSum and columnProduct
using System;
class Program
{
static void Main()
{
int rows = 3;
int columns = 3;
int minValue = 0;
int maxValue = 10;
@Pekcapeh
Pekcapeh / IJunior C# home work 18: boss fight
Created August 23, 2025 04:43
IJunior C# home work 18: boss fight
using System;
class Program
{
static void Main()
{
const string NormalAttackCommand = "1";
const string FireballCommand = "2";
const string ExplosionCommand = "3";
const string HealCommand = "4";