Main.cc: In function ‘int main()’: Main.cc:8:8: error: ‘a’ was not declared in this scope cin>>a[i]; ^ Main.cc:12:6: error: ‘a’ was not declared in this scope s+=a[i]; ^ Main.cc:5:10: warning: unused variable ‘t’ [-Wunused-variable] int n,m,t,s=0,c=0; ^