title: Generating random Graph
body: <p>Have someone input an integer N as the number of vertices in the graph.</p>
  
  <ul>
  <li>Assign random weights on each edges ranging from 1 to 10. Not all possible edges
  are present though! As in the above example, represented an absent edge by an X.</li>
  <li>Return a pair (M,L), with M and L respectively being the matrix and list representation
  of the (same) random graph you are generating.</li>
  <li>Use non-digit characters as vertex names, to avoid confusion with edge weights.</li>
  </ul>
  
  <p></p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;stdlib.h&gt;
  using namespace std;
  void gen_random_graph(int n)
  {
      int adj_matrix[n][n];
      for(int u = 0; u &lt; n; u++)
      {
          for (int v = 0; v &lt; n; v++)
          {
              if(adj_matrix[u][v]==adj_matrix[v][u])
              {
                  adj_matrix[u][v] = rand() % 10 + 1;
                  cout &lt;&lt; adj_matrix[u][v] &lt;&lt; endl;
              }
          }
      }
  
  }
  
  int main()
  {
      int N;
      cout &lt;&lt; "enter number of vertices" &lt;&lt; endl;
      cin &gt;&gt; N;
      gen_random_graph(N);
  
      return 0;
  }
  </code></pre>
  
  <p>THis is my code so far. Is it generateing the weights ? and what does it mean i have to return a pair?</p>