Need help for converting an integer to binary : <p>Im new to C++ and I need to make a program that can convert a decimal number into a binary one. This is what ive got so far, but it only shows 0000 0000 0000 0000 (the spaces are intended)</p>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;iostream&gt;
#include &lt;windows.h&gt;
#include &lt;math.h&gt;
float EntierAConvertir;

int main()
{
printf("Entrez l'entier à convertir\n");
scanf("%lf", &amp;EntierAConvertir);
    for(long double i = 16; i != 0; i-- )
    {
        if (EntierAConvertir &gt; (pow(2,i-1)))
        {
        printf("1");

        }
        else if (EntierAConvertir &lt; (pow(2,i-1)))
        {
        printf("0");

        }
        if (i == 13 | i==9 | i == 5)
        {
        printf(" ");
        }

    }


system("pause");
return 0;
}
</code></pre>

<p>Help is very appreciated! :)</p>
