/in/foo.cc: In function 'int main()':
/in/foo.cc:8:2: error: 'cin' was not declared in this scope
cin>>n;
^~~
/in/foo.cc:15:28: error: 'scanf' was not declared in this scope
while(scanf("%d",&t)==1&&t!=-1)
^
/in/foo.cc:27:13: error: 'cout' was not declared in this scope
cout<<j<<endl;
^~~~
/in/foo.cc:27:22: error: 'endl' was not declared in this scope
cout<<j<<endl;
^~~~
/in/foo.cc:24:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for(int j=0;j<=10000;j++)
^~~
/in/foo.cc:30:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
return 0;
^~~~~~