Hi,
Can anyone help me in this code bubble sort in c++,,,
this is my code.......
void main()
{
int A[5]={7,2,10,15,3};
int i,j,swap;
for(j=0;j<5;j++)
{
for(i=0;i<5;i++)
{
if(A[i]>A[i+1])
{
swap=A[i];
A[i]=A[i+1];
A[i+1]=swap;
}
}
}
for(i=0;i<5;i++)
cout<<A[i]<<endl;
}
:(