Advertisement
Atheuz

Untitled

Nov 9th, 2012
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication2
  8. {
  9.     public struct SudokoGrid {
  10.         public int[,] grid;
  11.         public SudokoGrid Init() {
  12.             return new SudokoGrid()
  13.             {
  14.                 grid = new int[9, 9]
  15.             };
  16.         }
  17.     }
  18.  
  19.     class Program
  20.     {
  21.         static void Main(string[] args)
  22.         {
  23.             SudokoGrid k = new SudokoGrid();
  24.             k = k.Init();
  25.             for (int i = 0; i < 9; i++) {
  26.                 for (int j = 0; j < 9; j++) {
  27.                     Console.Write(k.grid[i, j]);
  28.                 }
  29.                 Console.Write("\n");
  30.             }
  31.         }
  32.     }
  33. }
  34.  
  35. Output:
  36.  
  37. 000000000
  38. 000000000
  39. 000000000
  40. 000000000
  41. 000000000
  42. 000000000
  43. 000000000
  44. 000000000
  45. 000000000
  46. Press any key to continue . . .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement