title: Dividing 1/n always returns 0.0
body: <p>I am trying to calculate <code>p1=(1/1)*(1/2)*...*(1/n)</code> but something is wrong and the <code>printf</code> gives me <code>0.000...0</code></p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(void) {
  
      int i,num;
      float p3;
  
      do {
          printf ("give number N&gt;3 : \n" );
          scanf( "%d", &amp;num );
      } while( num &lt;= 3 );
  
      i = 1;
      p3 = 1;  
  
      do {
          p3=p3*(1/i);
          printf( "%f\n",p3 );
      } while ( i &lt;= num );
  
      printf("\nP3=%f",p3);
      return 0;
  }
  </code></pre>