fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. Random ran = new Random();
  8.  
  9. int n = 4, m = 5;
  10. int?[,] a = new int?[n, m];
  11.  
  12. for (int q=0; q<n; ++q)
  13. for (int w=0; w<m; ++w)
  14. a[q, w] = ran.Next(0, 9);
  15.  
  16. a[2, 3] = null;
  17.  
  18. for (int q=0; q<n; ++q)
  19. {
  20. for (int w=0; w<m; ++w)
  21. Console.Write("{0} ", a[q, w]?.ToString() ?? ".");
  22.  
  23. Console.WriteLine();
  24. }
  25. }
  26. }
Success #stdin #stdout 0.01s 131648KB
stdin
Standard input is empty
stdout
5 8 0 8 7 
1 5 1 3 1 
0 4 8 . 6 
3 6 2 3 6