why return statement does not return float? : <p>I am new to programming and learning C from schildt's teach yourself C. I am trying to make a function that returns square. but when I input numbers with decimals it outputs as whole number. why does it do that?
my program :</p>

<pre><code>    #include &lt;stdio.h&gt;
int get_sqr(void);

void main()
{
    float x;
    x = get_sqr();
    printf("square : %f",x);
    return 0;
}

int get_sqr(void)
{
    float y;
    printf("enter a number : ");
    scanf("%f",&amp;y);
    return y*y; /*returning the square result to assignment argument */
}
</code></pre>
