Hello there. Does anybody know why doesn't it work?
Compiler message:invalid types 'float [100][float]' for array subscript at lines 11,12.
Why does it work when at line 8 I change float with int?Code:#include<stdio.h> #define max 100 int main() {int f[max],a,b,c,x; /*line 8*/ printf("f(x)=ax^4+bx^2+c dose a,b,c\n"); scanf("%d %d %d",&a,&b,&c); for(x=0;x<max;x++) {f[x]=a*x*x*x+b*x*x+c; /*line 11*/ if(f[x]==0) printf("%d ",x);} /*line 12*/ getchar(); getchar(); return 0; }