foo.c:2:1: error: unknown type name 'using'
2 | using namespace std;
| ^~~~~
foo.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
2 | using namespace std;
| ^~~
foo.c: In function 'main':
foo.c:8:9: error: 'cin' undeclared (first use in this function)
8 | cin>>n
| ^~~
foo.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
foo.c:8:15: error: expected ';' before 'a'
8 | cin>>n
| ^
| ;
9 | a[1]=1
| ~
foo.c:17:25: warning: missing terminating " character
17 | cout << "2” << end1;
| ^
foo.c:17:25: error: missing terminating " character
17 | cout << "2” << end1;
| ^~~~~~~~~~~~~
foo.c:7:13: warning: unused variable 'i' [-Wunused-variable]
7 | int i,n;
| ^
foo.c:6:25: warning: unused variable 's' [-Wunused-variable]
6 | long long a[50],s=0;
| ^
foo.c:6:19: warning: unused variable 'a' [-Wunused-variable]
6 | long long a[50],s=0;
| ^
[Hydro](https://hydro.ac)提供评测服务