Guest User

Untitled

a guest
Apr 26th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. int[,] I1 = new int[4, 1] { { 1 }, { 1 }, { 1 }, { 1 } };
  2. int[,] I2 = new int[1, 4] { { 1, 1, 1, 1 } };
  3. int[,] Z1 = new int[3, 2] { { 0, 1 }, { 1, 1 }, { 1, 0 } };
  4.  
  5. Queue<int[,]> sor = new Queue<int[,]>();
  6. sor.Enqueue(I1);
  7. sor.Enqueue(I2);
  8. sor.Enqueue(Z1);
  9.  
  10. for (int i = 0; i < Fiok.GetLength(0); i++)
  11. {
  12. for (int j = 0; j < Fiok.GetLength(1); j++)
  13. {
  14. while (Fiok[i,j]==0)
  15. {
  16. int[,] kisorolt = sor.Dequeue();
  17. for (int k = 0; k < kisorolt.GetLength(0); k++)
  18. {
  19. for (int l = 0; l < kisorolt.GetLength(1); l++)
  20. {
  21. Fiok[i, j] = kisorolt[k, l];
  22. }
  23. }
  24. }
  25. }
  26. }
  27.  
  28. while (Fiok[i,j]==0)
  29. {
  30. int[,] kisorolt = sor.Dequeue();
  31. for (int k = 0; k < kisorolt.GetLength(0); k++)
  32. {
  33. for (int l = 0; l < kisorolt.GetLength(1); l++)
  34. {
  35. Fiok[i, j] = kisorolt[k, l];
  36. }
  37. }
  38. }
  39.  
  40. if (Fiok[i,j]==0)
  41. {
  42. int[,] kisorolt = sor.Dequeue();
  43. for (int k = 0; k < kisorolt.GetLength(0); k++)
  44. {
  45. for (int l = 0; l < kisorolt.GetLength(1); l++)
  46. {
  47. Fiok[i, j] = kisorolt[k, l];
  48. }
  49. }
  50. }
  51. else
  52. {
  53. //put any else statement
  54. }
Add Comment
Please, Sign In to add comment