Очень нужно превратить эти уже готовые задания в git-репозиторий, помогите пожалуйста!!!
Задача 1.
M = 1; N = 5 -> «2, 4»
M = 4; N = 8 -> «4, 6, 8»
Console.Write(«Введите значение M: «);
int m = Convert.ToInt32(Console.ReadLine());
Console.Write(«Введите значение N: «);
int n = Convert.ToInt32(Console.ReadLine());
void che(int m, int n)
{
if (m > n)
return;
if (m % 2 == 0)
{
Console.Write($»{m}, «);
}
che(m+1,n);
}
che(m,n);
Задача 2.
int[,] Create2DRandomArray()
static int Ack(int m, int n)
{
if (m == 0)
{
return n + 1;
}else if (n == 0)
{
return Ack(m - 1, 1);
}else
{
return Ack(m - 1, Ack(m, n - 1));
}
}
private void button1_Click(object sender, EventArgs e)
{
int a = int.Parse(textBox1.Text);
int b = int.Parse(textBox2.Text);
int eee = Ack(a, b);
textBox3.Text = eee.ToString();
}
Задача 3.
[1, 2, 5, 0, 10, 34] => 34 10 0 5 2 1
static void OutputReverseArray<T>(T[] a, int CurrentIteration)
{
if (CurrentIteration > a.Length - 1)
return;
OutputReverseArray(a, CurrentIteration + 1);
Console.Write(" " + a[CurrentIteration]);
}
Задача 1.
M = 1; N = 5 -> «2, 4»
M = 4; N = 8 -> «4, 6, 8»
Console.Write(«Введите значение M: «);
int m = Convert.ToInt32(Console.ReadLine());
Console.Write(«Введите значение N: «);
int n = Convert.ToInt32(Console.ReadLine());
void che(int m, int n)
{
if (m > n)
return;
if (m % 2 == 0)
{
Console.Write($»{m}, «);
}
che(m+1,n);
}
che(m,n);
Задача 2.
int[,] Create2DRandomArray()
static int Ack(int m, int n)
{
if (m == 0)
{
return n + 1;
}else if (n == 0)
{
return Ack(m - 1, 1);
}else
{
return Ack(m - 1, Ack(m, n - 1));
}
}
private void button1_Click(object sender, EventArgs e)
{
int a = int.Parse(textBox1.Text);
int b = int.Parse(textBox2.Text);
int eee = Ack(a, b);
textBox3.Text = eee.ToString();
}
Задача 3.
[1, 2, 5, 0, 10, 34] => 34 10 0 5 2 1
static void OutputReverseArray<T>(T[] a, int CurrentIteration)
{
if (CurrentIteration > a.Length - 1)
return;
OutputReverseArray(a, CurrentIteration + 1);
Console.Write(" " + a[CurrentIteration]);
}