foo.cc: In function 'int main()':
foo.cc:6:12: error: size of array 'a' has non-integral type 'double'
int a[N];
^
foo.cc:7:9: error: 'cin' was not declared in this scope
int x; cin>>x;
^~~
foo.cc:7:9: note: suggested alternative:
In file included from foo.cc:1:0:
/usr/include/c++/6/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^~~
foo.cc:24:22: error: lvalue required as left operand of assignment
if(k!=len&&i=len-k+1)
^
foo.cc:27:4: error: 'cout' was not declared in this scope
cout<<a[i];
^~~~
foo.cc:27:4: note: suggested alternative:
In file included from foo.cc:1:0:
/usr/include/c++/6/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^~~~