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;
- namespace ConsoleApplication2
- {
- class Program
- {
- static Random r = new Random();
- static void Main(string[] args)
- {
- int[,] tm = new int[10, 10];
- felt(tm);
- kiir(tm);
- Console.ReadLine();
- }
- static void kiir(int[,] tm)
- {
- for (int x = 0; x < 10; x++)
- {
- for (int y = 0; y < 10; y++)
- {
- Console.Write("{0} ", tm[x, y]);
- }
- Console.WriteLine("");
- }
- }
- static int generalt()
- {
- int a = r.Next(10, 100);
- return a;
- }
- static void felt(int[,] tm)
- {
- for (int x = 0; x < 10; x++)
- {
- for (int y = 0; y < 10; y++)
- {
- if (y == 2)
- {
- tm[x, y] = 0;
- }
- else
- tm[x, y] = generalt();
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment