i did a simple bubble sort but it is ot working . help me out.
#include<stdio.h>
main()
{
int i,j,k;
int a[]={7,9,4,2,3,6};
for(i=0;i<7;i++)
for(j=i+1;j<7;j++)
if(a[j]<a[j-1])
{
k=a[j];
a[j]=a[j-1];
a[j-1]=k;
}
for(i=0;i<7;i++)
printf("a[%d]==>%d",i,a[i]);
}