rand() function doesn't works properly : <p>I have a problem with  rand() function
I want to build a program that shows the number of each face of dice when you throw it 6000 times</p>

<p>I wrote this code </p>

<pre><code>#include &lt;iostream&gt;
using namespace std;
#include &lt;iomanip&gt;
using std::setw;
#include &lt;cstdlib&gt;
#include &lt;ctime&gt;
int main()
{
int face ;
int frequency1 =0;
int frequency2 =0;
int frequency3 =0;
int frequency4 =0;
int frequency5 =0;
int frequency6 =0;
for(int counter =1;counter &lt;=6000;counter++){

      face = 1+rand()%6;
      switch(face){
    case 1:
        ++frequency1;
        break;

     case 2:
        ++frequency1;
        break;

     case 3:
        ++frequency1;
        break;

     case 4:
        ++frequency1;
        break;

     case 5:
        ++frequency1;
        break;

     case 6:
        ++frequency1;
        break;
     default:
        cout&lt;&lt;"program should never get here!!! ";
        break;
  }}
  cout&lt;&lt;"the number of face 1 is : "&lt;&lt;frequency1&lt;&lt;endl;
 cout&lt;&lt;"the number of face 2 is : "&lt;&lt;frequency2&lt;&lt;endl;
 cout&lt;&lt;"the number of face 3 is : "&lt;&lt;frequency3&lt;&lt;endl;
 cout&lt;&lt;"the number of face 4 is : "&lt;&lt;frequency4&lt;&lt;endl;
 cout&lt;&lt;"the number of face 5 is : "  &lt;&lt;frequency5&lt;&lt;endl;
 cout&lt;&lt;"the number of face 6 is : "      &lt;&lt;frequency6&lt;&lt;endl;
 return 0;
 }
</code></pre>

<p>Every time that i run this code it shows the same thing</p>

<pre><code>the number of face 1 is : 6000
the number of face 2 is : 0
the number of face 3 is : 0
the number of face 4 is : 0
the number of face 5 is : 0
the number of face 6 is : 0
</code></pre>
