static void Main()
 {
     int arrayHight = GetValidInput("Enter the height of the matrix (min 3) : ", 3);
     int arrayWidth = GetValidInput("Enter the width of the matrix (min 3) : ", 3);
     // check the coments in the class implementation for educational purposses
     RandomStringMatrix newMatrix = new RandomStringMatrix(arrayHight, arrayWidth);
     newMatrix.PrintMatrix();
     Console.WriteLine("Longest sequence length is : {0}",newMatrix.maxSeqLen);
     Console.WriteLine("The string in the longest sequence is : {0}",newMatrix.stringSeq);
     Console.WriteLine("Sequence starts at position [row: {0}, column: {1}] .",newMatrix.seqY,newMatrix.seqX);
     Console.WriteLine("Sequence direction - {0}",newMatrix.seqDirection);
 }
Esempio n. 2
0
    static void Main()
    {
        int arrayHight = GetValidInput("Enter the height of the matrix (min 3) : ", 3);
        int arrayWidth = GetValidInput("Enter the width of the matrix (min 3) : ", 3);
        // check the coments in the class implementation for educational purposses
        RandomStringMatrix newMatrix = new RandomStringMatrix(arrayHight, arrayWidth);

        newMatrix.PrintMatrix();
        Console.WriteLine("Longest sequence length is : {0}", newMatrix.maxSeqLen);
        Console.WriteLine("The string in the longest sequence is : {0}", newMatrix.stringSeq);
        Console.WriteLine("Sequence starts at position [row: {0}, column: {1}] .", newMatrix.seqY, newMatrix.seqX);
        Console.WriteLine("Sequence direction - {0}", newMatrix.seqDirection);
    }