Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Наибольший_элемент
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[,] array = {{ 1, 2, 3 },{ 4, 12, 6 },{ 7, 8, 9 }};
- int max = int.MinValue;
- for(int i = 0; i < array.GetLength(0); i++)
- {
- for (int j = 0; j < array.GetLength(1); j++)
- {
- Console.WriteLine(array[i, j]);
- if (array[i, j] > max)
- {
- max = array[i, j];
- }
- }
- }
- Console.WriteLine(max);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement