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