using System;

class Program
{
    static void Main()
    {
        string vards = "Ilja", uzvards = "Sipols";
        char[] line1 = ("x" + vards).ToCharArray(); // ToCharArray sadala vardus atseviskus simbolus piem. v a r d s
        char[] line2 = ("x" + uzvards).ToCharArray();
        int garums = line2.Length;

        Console.WriteLine($"Mans vārds ir {vards}. ({vards.Length} simboli)");
        Console.WriteLine($"Mans uzvārds ir {uzvards}. ({uzvards.Length} simboli)");

        string granica = "+---+----+----+----+----+----+----+----+----+----+----+";
        Console.WriteLine(granica);
        Console.Write("| ");
        foreach (char c in line1)
            Console.Write($"| {c} ");
        Console.WriteLine("| max | min | vid | sum |");
        Console.WriteLine(granica);

        Random rand = new Random();
        for (int i = 0; i < garums; i++)
        {
            int[] nums = Enumerable.Range(0, 5).Select(_ => rand.Next(5, 20)).ToArray(); //rada secibu ar 5 skaitliem, sakot no 0. _ nozime ka skaitli netik izmantoti no secibas

            Console.Write($"| {line2[i]} ");
            foreach (int n in nums)
                Console.Write($"| {n,2} "); // $ norada ka ta bus interpoleta
            Console.WriteLine($"| {nums.Max(),2} | {nums.Min(),2} | {nums.Average(),4:F1} | {nums.Sum(),3} |");
        }
        Console.WriteLine(granica);
    }
}
