Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp8
- {
- class Program
- {
- static void Main(string[] args)
- {
- Random rand = new Random(); //класс random
- int stlb, strk;
- Console.WriteLine("Введите количество строк:");
- strk = Convert.ToInt32(Console.ReadLine()); //кол-во строк
- Console.WriteLine("Введите количество столбцов:");
- stlb = Convert.ToInt32(Console.ReadLine()); //кол-во столбцов
- int a = rand.Next(1, 100);
- int[,] numbs = new int[a, a]; //ограничение чисел рандома
- for (int i = 0; i < strk; i++)
- {
- for (int j = 0; j < stlb; j++)
- {
- Console.Write($"{numbs[i,j]} \t"); //матрица
- }
- Console.WriteLine();
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment