--- C# 7.3 ---
using System;
using System.Collections.Generic;
using System.Linq;
namespace CSLear
{
class Program
{
private const int stdRow = 5;
private const int stdCols = 6;
static void Main(string[] args)
{
int[,] Arr = new int[stdRow, stdCols];
ArrayRandomize(ref Arr, stdRow, stdCols);
RemoveFirstRow(ref Arr, stdRow, stdCols);
Console.ReadKey();
}
public static void RemoveFirstRow<T>(ref T[,] Matr, int ArrRows, int ArrCols)
{
T[,] Temp = new T[ArrRows-1,ArrCols];
for (int i = 1; i < ArrRows; i++)
{
for (int j = 0; j < ArrCols; j++)
{
Temp[i - 1, j] = Matr[i, j];
}
}
Matr = Temp;
}
public static void ArrayRandomize(ref int[,] Arr, int ArrRows, int ArrCols)
{
Random r = new Random();
for (int i = 0; i < ArrRows; i++)
{
for (int j = 0; j < ArrCols; j++)
{
Arr[i, j] = r.Next(-99, 99);
}
}
}
}
}
Объяснение:
Function func32771914() As String
Dim i As Single, S As String
For i = 0.12 To 1.88 Step 0.12
S = S & Cos(i ^ 2) + 5 / i ^ 3 - 2 & ";"
Next
func32771914 = S
End Function
Excel VBA