Main.cc:2:7: error: expected nested-name-specifier before ‘amespace’ using amespace std; ^~~~~~~~ Main.cc: In function ‘int main()’: Main.cc:7:2: error: ‘cin’ was not declared in this scope cin>>n; ^~~ Main.cc:7:2: note: suggested alternative: In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:75:0, from Main.cc:1: /usr/include/c++/7/iostream:60:18: note: ‘std::cin’ extern istream cin; /// Linked to standard input ^~~ Main.cc:21:16: error: ‘avg’ was not declared in this scope c+-abs(b[j]-avg); ^~~ Main.cc:25:8: error: ‘min’ was not declared in this scope maxc=min(maxc,c); ^~~ Main.cc:25:8: note: suggested alternative: In file included from /usr/include/c++/7/algorithm:62:0, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65, from Main.cc:1: /usr/include/c++/7/bits/stl_algo.h:3456:5: note: ‘std::min’ min(initializer_list<_Tp> __l, _Compare __comp) ^~~ Main.cc:27:2: error: ‘cout’ was not declared in this scope cout<& __os) ^~~~