title: implicit declaration of function 'time' [-Wimplicit-function-declaration]|
body: <p>Whenever I try to use <code>srand</code> function I get this <strong>warning</strong>   </p>
  
  <pre><code>"implicit declaration of function 'time' [-Wimplicit-function-declaration]|" 
  </code></pre>
  
  <p>and a <strong>windows error report</strong> appears when <strong>running the compiled file</strong>,<br>
  I'm a novice to c programming, I found this on a text book, but it doesn't work for me.  </p>
  
  <pre><code>  srand (time());  
    int x= (rand()%10) +1;  
    int y= (rand()%10) +1;  
    printf("\nx=%d,y=%d", x,y); 
  </code></pre>
  
  <p>What do I need to correct this?   </p>