title: Filling the Multidimensional Array in Swift
body: <p>I'm newbie to Swift and I got a problem with Swift language.</p>
  
  <p>I should make a function, which creates a 2-dimensional matrix NxN and finds sum of diagonally situated elements. 
  I've got some problem with filling an array with random values.</p>
  
  <p>That's my code:</p>
  
  <pre><code>import Foundation
  func diagonal (N:Int) {
      var array: [[Int]] = [[0],[0]]
      for row in 0...N {
          for col in 0...N {
              var z = Int(arc4random_uniform(100))
              array[row][col] = z
          }
      }
      println (array)
  }    
  </code></pre>
  
  <p>It doesn't work.</p>
  
  <p>So I'm looking forward for your help.</p>