You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
void bubble(int *a,int n)
|
|
{
|
|
int i,j,temp;
|
|
for(i=0;i<n-1;i++)
|
|
{
|
|
for(j=i+1;j<n;j++)
|
|
{
|
|
if(a[i]>a[j])
|
|
{
|
|
temp=a[i];
|
|
a[i]=a[j];
|
|
a[j]=temp;
|
|
}
|
|
}
|
|
}
|
|
}
|