Advertisement
Guest User

enkidu

a guest
Nov 26th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             int[,] matrix = new int[10, 10];
  13.             Random elem = new Random();
  14.             int cv1, cv2;
  15.             for(cv1=0;cv1<=9;cv1++)
  16.             {
  17.                 for (cv2 = 0; cv2 <= 9; cv2++)
  18.                 {
  19.                     matrix[cv1, cv2] = elem.Next(1, 10);
  20.                 }
  21.             }
  22.             for (cv1 = 0; cv1 <= 9; cv1++)
  23.             {
  24.                 for (cv2 = 0; cv2 <= 9; cv2++)
  25.                 {
  26.                     Console.Write("{0} ", matrix[cv1, cv2]);
  27.                 }
  28.                 Console.WriteLine("");
  29.             }
  30.             Console.ReadKey();
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement