Card Hangover C : <p>I am trying to do this problem: <a href="http://poj.org/problem?id=1003" rel="nofollow">http://poj.org/problem?id=1003</a> </p>

<pre><code>    #include &lt;stdio.h&gt;

    int c;
    int a = 0;
    int i;


    int main()
    {
        scanf("%.2f", &amp;c);
        if (0.01 &lt;= c &lt;= 5.20){
            for (i = 1; a &lt; c; ++i){
                a += (1/(i + 1));
            }
            printf("%d card(s)", i + 1);
        }
        return 0;
    }
</code></pre>

<p>My code isn't working? For some reason it always returns 2 card(s) no matter what I enter. Can someone find the problem?</p>

<p>Thanks!</p>
