Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Numerics;
- using System.Text;
- using System.Text.RegularExpressions;
- using System.Threading.Tasks;
- namespace solutions
- {
- class Program
- {
- public static void Main()
- {
- var matrixSize = int.Parse(Console.ReadLine());
- var rows = matrixSize;
- var cols = matrixSize;
- var matrix = new char[rows, cols];
- for (int row = 0; row < matrix.GetLength(0); row++)
- {
- var values = Console.ReadLine();
- for (int col = 0; col < matrix.GetLength(1); col++)
- {
- matrix[row, col] = values[col];
- }
- }
- var symbol = char.Parse(Console.ReadLine());
- for (int row = 0; row < rows; row++)
- {
- for (int col = 0; col < cols; col++)
- {
- if (matrix[row, col] == symbol)
- {
- Console.WriteLine($"({row}, {col})");
- return;
- }
- }
- }
- Console.WriteLine($"{ symbol} does not occur in the matrix");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement