damyan91

Untitled

Jun 1st, 2017
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. int[] sizes = Console.ReadLine()
  2. .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
  3. .Select(int.Parse)
  4. .ToArray();
  5.  
  6. int[][] rubik = new int[sizes[0]][];
  7.  
  8. int counter = 1;
  9.  
  10. for (int row = 0; row < rubik.Length; row++)
  11. {
  12. rubik[row] = new int[sizes[1]];
  13.  
  14. for (int col = 0; col < sizes[1]; col++)
  15. {
  16. rubik[row][col] = counter;
  17. counter++;
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment