Language: C++

#include<iostream>#include<algorithm>#include<vector>using namespace std;
int main(){vector<int> a(10);int i=0;for(;i++<10;)cin>>a[i];sort(a.begin(),a.end());cout<<a[9]<<"\n"<<a[8]<<"\n"<<a[7]<<endl;}

Compiler output:
a.cc:1:19: warning: extra tokens at end of #include directive
    1 | #include<iostream>#include<algorithm>#include<vector>using namespace std;
      |                   ^
a.cc: In function 'int main()':
a.cc:2:12: error: 'vector' was not declared in this scope
    2 | int main(){vector<int> a(10);int i=0;for(;i++<10;)cin>>a[i];sort(a.begin(),a.end());cout<<a[9]<<"\n"<<a[8]<<"\n"<<a[7]<<endl;}
      |            ^~~~~~
a.cc:2:19: error: expected primary-expression before 'int'
    2 | int main(){vector<int> a(10);int i=0;for(;i++<10;)cin>>a[i];sort(a.begin(),a.end());cout<<a[9]<<"\n"<<a[8]<<"\n"<<a[7]<<endl;}
      |                   ^~~
a.cc:2:51: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    2 | int main(){vector<int> a(10);int i=0;for(;i++<10;)cin>>a[i];sort(a.begin(),a.end());cout<<a[9]<<"\n"<<a[8]<<"\n"<<a[7]<<endl;}
      |                                                   ^~~
      |                                                   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:2:56: error: 'a' was not declared in this scope
    2 | int main(){vector<int> a(10);int i=0;for(;i++<10;)cin>>a[i];sort(a.begin(),a.end());cout<<a[9]<<"\n"<<a[8]<<"\n"<<a[7]<<endl;}
      |                                                        ^
a.cc:2:66: error: 'a' was not declared in this scope
    2 | int main(){vector<int> a(10);int i=0;for(;i++<10;)cin>>a[i];sort(a.begin(),a.end());cout<<a[9]<<"\n"<<a[8]<<"\n"<<a[7]<<endl;}
      |                                                                  ^
a.cc:2:61: error: 'sort' was not declared in this scope; did you mean 'short'?
    2 | int main(){vector<int> a(10);int i=0;for(;i++<10;)cin>>a[i];sort(a.begin(),a.end());cout<<a[9]<<"\n"<<a[8]<<"\n"<<a[7]<<endl;}
      |                                                             ^~~~
      |                                                             short
a.cc:2:85: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    2 | int main(){vector<int> a(10);int i=0;for(;i++<10;)cin>>a[i];sort(a.begin(),a.end());cout<<a[9]<<"\n"<<a[8]<<"\n"<<a[7]<<endl;}
      |                                                                                     ^~~~
      |                                                                                     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:2:121: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    2 | int main(){vector<int> a(10);int i=0;for(;i++<10;)cin>>a[i];sort(a.begin(),a.end());cout<<a[9]<<"\n"<<a[8]<<"\n"<<a[7]<<endl;}
      |                                                                                                                         ^~~~
      |                                                                                                                         std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~