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 Lesson3
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[,] array = new int[10, 10];
- int max = 0;
- Random rand = new Random();
- for (int i = 0; i<10; i++)
- {
- for (int j = 0; j < 10; j++)
- {
- array[i,j] = rand.Next(1,10);
- //Console.Write(array[i, j] + " ");
- if (max < array[i, j])
- {
- max = array[i,j];
- }
- if (array[i, j] == max)
- {
- array[i, j] = 0;
- }
- Console.Write(array[i, j] + " ");
- }
- Console.WriteLine();
- }
- Console.WriteLine("max chislo = " + max);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement