Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. static void Main(string[] args)
  2. {
  3. int[,] zweiDimArray = new int[10, 10];
  4. int start = 1;
  5.  
  6. for(int i = 1; i < zweiDimArray.GetLength(0); i++)
  7. {
  8. for(int j = 0; j < zweiDimArray.GetLength(1);j++)
  9. {
  10. zweiDimArray[i, j] = start;
  11. start++;
  12. }
  13. }
  14.  
  15. for (int i = 1; i < zweiDimArray.GetLength(0); i++)
  16. {
  17. for (int j = 0; j < zweiDimArray.GetLength(1); j++)
  18. {
  19. Console.Write(" " + zweiDimArray[i,j] + " ");
  20. }
  21. Console.WriteLine();
  22. }
  23.  
  24. Console.ReadKey();
  25.  
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement