Main.cc:2:7: error: expected nested-name-specifier before ‘namesapce’ using namesapce std; ^~~~~~~~~ Main.cc: In function ‘int main()’: Main.cc:6:5: error: ‘cin’ was not declared in this scope cin >> x; ^~~ Main.cc:6:5: 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:7:43: error: ‘cout’ was not declared in this scope if(x%400==0 or (x%4==0 and x%100!=0)) cout << "Y"; ^~~~ Main.cc:7:43: 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:61:18: note: ‘std::cout’ extern ostream cout; /// Linked to standard output ^~~~ Main.cc:8:10: error: ‘cout’ was not declared in this scope else cout << "N"; ^~~~ Main.cc:8:10: 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:61:18: note: ‘std::cout’ extern ostream cout; /// Linked to standard output ^~~~