Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- int k = 0;
- int max = 0;
- int numstr = 0;
- int[,] msv = { { 4, 0, 1, 8 },
- { 7, 7, 7, 7 },
- { 3, 5, 5, 8 }
- };
- for (int i = 0; i < 3; i++)
- {
- k = 0;
- for (int j = 0; j < 3; j++)
- {
- if (msv[i, j] == msv[i, j + 1])
- {
- k++;
- if (k > max)
- {
- max = k;
- numstr = i;
- }
- } else k=0;
- }
- }
- Console.WriteLine("Номер строки"+ numstr);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement