title: How to check if a real number is a natural number in pascal?
body: <p>I'm a beginner and I'm trying to write a simple program that will calculate all the dividers of a number. After doing a division I want to write only the dividers that give me a natural number. I can't think of a way to do it.</p>
  
  <p>Loop with dividing the number</p>
  
  <pre><code>For i := 1 to x do
      Begin
          D := x div i; 
          WriteLn ('Divider', lp, '. ', x, ' : ', i, ' = ', D); 
          lp := lp +1; 
      End;
  </code></pre>