title: Determine if a number is a whole number?
body: <p>I'm trying to make a program that will divide a number by 2 only if that number is divisible by 2. I made it so that if the result of the number divided by 2 is a float, then divide it by two, like this:</p>
  
  <pre><code>int p;
  printf("Percentage please: ");
  scanf("%d", &amp;p);
  while (((p/2) != // a floating point value)
  {
      p = p/2;
  }
  </code></pre>
  
  <p>But the problem is that I'm not sure if there is a function in the C standard libraries like <code>isint()</code> or <code>iswholenumber()</code>. Is there any function or any way I could implement something similar?
  Any help would be appreciated.</p>