0_0_30385316_23460.cpp: In function 'int main()': 0_0_30385316_23460.cpp:17:9: error: 'i' was not declared in this scope for(i=0;i<n;i++) if(a[i]==x) count++; ^