turbo sort question doubt

WHY IT IS SHOWING RUN TIME ERROR FOR TURBO SORT QUESTION
FOR THIS CODE?

include

using namespace std;
int main()
{int i,a[11],t,temp;
cin>>t;
for(i=0;i<t;i++)
{cin>>a[i];
}
for(int j=0;j<t;j++)
{for(int k=j+1;k<t;k++)
{if(a[j]>a[k])
{ temp=a[j];
a[j]=a[k];
a[k]=temp;
}}
}
for(int b=0;b<t;b++)
cout<<"\n"<<a[b];
}