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 ConsoleApp5
- {
- class Program
- {
- static void Main(string[] args)
- {
- Random rand = new Random();
- int[,] array = new Int32[10, 10];
- int max = array[0, 0];
- for (int i = 0; i < array.GetLength(0); i++)
- {
- for (int j = 0; j < array.GetLength(1); j++)
- {
- array[i, j] = rand.Next(0, 101);
- Console.Write(array[i, j] + " ");
- if (max < array[i, j])
- {
- max = array[i, j];
- }
- }
- }
- Console.WriteLine("");
- Console.WriteLine("самое большое число: " + max);
- for (int i = 0; i < array.GetLength(0); i++)
- {
- for (int j = 0; j < array.GetLength(1); j++)
- {
- if (max == array[i, j])
- {
- array[i, j] = 0;
- }
- Console.Write(array[i, j] + " ");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement