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 ConsoleApp13
- {
- class Program
- {
- static void Main(string[] args)
- {
- var rand = new Random();
- int[,] tab = new int[10, 10];
- int count = 0;
- string losowania = "";
- for (int i = 0; i < 10; i++)
- {
- for (int j = 0; j < 10; j++)
- {
- tab[i, j] = rand.Next(1, 7);
- Console.Write(tab[i, j] + " ");
- count++;
- if (tab[i, j] == 6)
- {
- losowania += count + " ";
- }
- }
- Console.WriteLine("\n");
- }
- Console.WriteLine("|6 wypadła w losowaniach: " + losowania);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement