Sir what is wrong in this? 1 test case is failing again and again.
#include
using namespace std;
int main() {
int n,temp;
cin>>n;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
for(int i=0;i<n-1;i++)
{
for(int j=0;j<n;j++ )
{if(a[j]>a[j+1])
{temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
for(int i=0;i<n;i++)
{
cout<<a[i]<<endl;
}
return 0;
}