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