Bubble sort help plz
#include<stdio.h>
int main()
{
int i,pass,temp,a[10],n;
printf("Enter the number of elements you would like to enter");
printf("%d",n);
printf("Enter the elements of the array");
for(i=0;i<n;i++)
scanf("%d",&a);
for(pass=1;pass<=n-1;pass++)
{
for(i=0;i<=n-1-pass;i++)
{
if(a>a[i+1])
{
temp=a;
a=a[i+1];
a[i+1]=temp;
}
}
}
printf("The sorted array is");
printf("%d",a);
return 0;
}