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;
- using System.IO;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int nrO = 0, nr1 = 0, nr2 = 0;
- List<int> nrObrazu = new List<int>();
- List<int> nrBox = new List<int>();
- for (int j = 0; j < 64; j++)
- nrObrazu.Add(j + 1);
- for (int j = 0; j < 16; j++)
- nrBox.Add(j + 1);
- for (int i = 0; i < 16/2; i++)
- {
- var Obrazy = nrObrazu.OrderBy(a => Guid.NewGuid());
- nrO = Obrazy.First();
- nrObrazu.Remove(nrO);
- var Boxy = nrBox.OrderBy(a => Guid.NewGuid());
- nr1 = Boxy.First();
- nrBox.Remove(nr1);
- nr2 = Boxy.First();
- nrBox.Remove(nr2);
- Console.Write(nrO + " " + "numery obrazow: ");
- for(int j=0;j<nrObrazu.Count();j++)
- Console.Write(nrObrazu[j] + " ");
- Console.WriteLine();
- Console.Write(nr1 + " " + nr2 + " " + "numery obrazow: ");
- for (int j = 0; j < nrBox.Count(); j++)
- Console.Write(nrBox[j] + " ");
- Console.WriteLine();
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement