diff --git a/bubble sort algo.c b/bubble sort algo.c new file mode 100644 index 0000000..bcd3efb --- /dev/null +++ b/bubble sort algo.c @@ -0,0 +1,30 @@ +#include +#include +int k,n,i,j=1,l; +int main() { + printf("enter the no. of element you wnt to take in array\n"); + scanf("%d",&n); + printf("enter the values of element in the array"); + int a[n]; + for(i=0;ia[j+1]) + { + int x; + x=a[j+1]; + a[j+1]=a[j]; + a[j]=x; + } + } + } + for(l=0;l