#include
main()
{
int a[10],n,i,pass;
system("clear");
printf("\nEnter the number of elements : ");
scanf("%d",&n);
printf("\nEnter the elements one by one...\n");
for(i=0;i
printf("\nMaking the sorting of elements in Bubble Sort...\n");
for(pass=0;pass
{
a[i]=a[i]+a[i+1];
a[i+1]=a[i]-a[i+1];
a[i]=a[i]-a[i+1];
}
printf("\nElements in the order after Bubble sort..\n");
for(i=0;i
}
No comments:
Post a Comment