Displaying weird characters Turbo C++
<p>I have a little trouble in the display of heights for my program. This is what i wrote:</p>

<pre><code>if (0 &lt; LaserX &lt; 161) {
LaserX = LaserX/n;
LaserY = LaserY/n;
sprintf(LaserMID, "%.1f, %.1f", LaserX, LaserY);
ShowCo-&gt;Text = LaserMID;
}
else { ShowCo-&gt;Text = 0; }
</code></pre>

<p>So basically it will show the height value when I have LaserX between 0 to 161, and anything out of that it shows 0. But in my case, when the LaserX value is out of the range, it shows me -NAN instead. What is -NAN?! How do i get rid of it?
Please advice, thnx.</p>
