foo.c: In function 'main':
foo.c:5:5: error: 'cin' undeclared (first use in this function)
    5 |     cin>>n;
      |     ^~~
foo.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:8:5: warning: implicit declaration of function 'sort' [-Wimplicit-function-declaration]
    8 |     sort(a+1,a+n+1);
      |     ^~~~
foo.c:10:9: error: 'cout' undeclared (first use in this function)
   10 |         cout<<a[i]<<" ";
      |         ^~~~
foo.c:11:11: error: 'endl' undeclared (first use in this function)
   11 |     cout<<endl;
      |           ^~~~
   
  
    [Hydro](https://hydro.ac)提供评测服务