what's problem here?
it shows a bug, help me I'm a beginner.
can I use double in array?

```
    #include <stdio.h>
    int main()
    {
    double a;
    scanf("%lf",&a);
    double s[a];
    double b,c=0, d;
    for(b=0;b<a;b++){
    scanf("%lf",&s[b]);
    }
    for(b=0;b<a;b++){
    c = c + s[b];
    d=b+1;
    printf("%lf\n",c/d);
    }
    return 0;
    }

```