Guest User

Untitled

a guest
May 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.24 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication2
  7. {
  8.     class Program
  9.     {
  10.         static Random r = new Random();
  11.         static void Main(string[] args)
  12.         {
  13.             int[,] tm = new int[10, 10];
  14.             felt(tm);
  15.             kiir(tm);
  16.             Console.ReadLine();
  17.  
  18.         }
  19.  
  20.         static void kiir(int[,] tm)
  21.         {
  22.            
  23.             for (int x = 0; x < 10; x++)
  24.             {
  25.                 for (int y = 0; y < 10; y++)
  26.                 {
  27.                     Console.Write("{0} ", tm[x, y]);
  28.                 }
  29.                 Console.WriteLine("");
  30.             }
  31.         }
  32.         static int generalt()
  33.         {
  34.             int a = r.Next(10, 100);
  35.             return a;
  36.         }
  37.         static void felt(int[,] tm)
  38.         {
  39.            
  40.             for (int x = 0; x < 10; x++)
  41.             {
  42.                 for (int y = 0; y < 10; y++)
  43.                 {
  44.                     if (y == 2)
  45.                     {
  46.                         tm[x, y] = 0;
  47.                     }
  48.                     else
  49.                         tm[x, y] = generalt();
  50.                 }
  51.             }
  52.         }
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.     }
  63. }
Add Comment
Please, Sign In to add comment