foo.cpp: In function 'int main()':
foo.cpp:8:29: error: conflicting declaration 'int a [10]'
int n,a,b,k,t,j;int a[10]={0};
^
foo.cpp:8:11: note: previous declaration as 'int a'
int n,a,b,k,t,j;int a[10]={0};
^
foo.cpp:13:21: warning: statement has no effect [-Wunused-value]
if(n/a>0)n/a+b;
^
foo.cpp:14:17: error: 'i' was not declared in this scope
else {a[i]=a/pow(10,10-i);++i;}
^
foo.cpp:16:5: error: expected ';' before 'do'
do
^
foo.cpp:18:13: error: 'i' was not declared in this scope
t=a[i];
^
foo.cpp:19:17: error: invalid types 'int[int]' for array subscript
a[i]=a[1];
^
foo.cpp:20:12: error: invalid types 'int[int]' for array subscript
a[1]=t;
^
foo.cpp:23:21: error: invalid types 'int[int]' for array subscript
a[i-j]=a[1+j];
^
foo.cpp:24:14: error: invalid types 'int[int]' for array subscript
a[1+j]=1;
^
foo.cpp:25:16: error: 'i' was not declared in this scope
} while((a[i]>a[i+1])&&(a[i+1]==0))
^
foo.cpp:26:5: error: expected ';' before 'cout'
cout<<n;
^
foo.cpp:27:13: error: expected '}' at end of input
return 0;
^