Why alltime output 0?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <stdio.h>
#include <math.h>

int main()
{
    int n;
    scanf("%d",&n);

    while(n--)
    {
        long double Y,R;
        scanf("%lf",&Y);

        R=sqrtl(Y);

        if(n>0)
            printf("%0.0lf\n\n",R);
        else if(n==0)
            printf("%0.0lf\n",R);
    }

    return 0;
}

In function 'int main()':
12:23: warning: format '%lf' expects argument of type 'double*', but argument 2 has type 'long double*' [-Wformat]
17:34: warning: format '%lf' expects argument of type 'double', but argument 2 has type 'long double' [-Wformat]
19:32: warning: format '%lf' expects argument of type 'double', but argument 2 has type 'long double' [-Wformat] 
Topic archived. No new replies allowed.