Why is this NaN
<p>Im trying to run the following code</p>

<pre><code>  int salespersons=0,weeks=0,days=5;

  double weekly_sales[weeks][salespersons][days];
  double total_weekly_sales[weeks];


for(int w=0; w &lt; weeks;w++)
  {
     for(int d =0; d &lt; days; d++)
     {  

        for(int s=0; s &lt; salespersons; s++)
        {

           {
              total_weekly_sales[w]+=weekly_sales[w][s][d];
              total_overall_weekly_sales[s]+= weekly_sales[w][s][d];

           }
        }  
     }

  }
</code></pre>

<p>when I run only..</p>

<pre><code>cout &lt;&lt; total_weekly_sales[0];
</code></pre>

<p>I get NaN therefore skipping the first section of the array while processing the rest.</p>
