title: How to stop a division if the result is a float number?
body: <p>i have programmed this code but it show me partially the result as example 50/3 show me 16 while i want to introduce to stop this kind of operations if float. How to do?</p>
  <pre><code>#include &lt;stdio.h&gt;
  int main(){
      int number, divisor, x, y;
      printf(&quot;Enter the Natural Number to find Divisors\n&quot;);
      scanf(&quot;%d&quot;, &amp;number);
      printf(&quot;Enter the Natural Number to divide for\n&quot;);
      scanf(&quot;%d&quot;, &amp;x);
          
      printf(&quot;Divisors of the number %d are \n&quot;, number);
      y=number/x;
      for (divisor = 1; divisor&lt;=number;divisor++){
      if((number%divisor)==0){
      printf(&quot;%d\n&quot;, divisor);
      
      }
      else{
      continue; }
      
  }
  printf(&quot;The result of the division is %d&quot;, y);
  return 0;
  }
  </code></pre>