foo.c: In function ‘main’:
foo.c:4:9: error: ‘cin’ undeclared (first use in this function)
4 | cin>>n;
| ^~~
foo.c:4:9: note: each undeclared identifier is reported only once for each function it appears in
foo.c:8:17: error: ‘cout’ undeclared (first use in this function)
8 | cout<<1<<endl;
| ^~~~
foo.c:8:26: error: ‘endl’ undeclared (first use in this function)
8 | cout<<1<<endl;
| ^~~~
foo.c:14:19: error: expected expression before ‘<’ token
14 | { cout<<<1<<" "<<1<<" "<<2<<" ";
| ^
foo.c:20:28: error: invalid suffix ";" on integer constant
20 | i+=1;
| ^~~
foo.c:20:31: error: expected ‘;’ before ‘}’ token
20 | i+=1;
| ^
| ;
21 | }
| ~