diff --git a/cpp/bubble_short.cpp b/cpp/bubble_short.cpp new file mode 100644 index 000000000..ae499e3f7 --- /dev/null +++ b/cpp/bubble_short.cpp @@ -0,0 +1,34 @@ +#include +#include +void bubblesort(int a[],int n); +main() +{ + clrscr(); + int a[20],n; + cout<<"Enter number of elements:"; + cin>>n; + cout<>a[i]; + } +} +bubblesort(int a[],n) +{ + int temp; + for(int i=1;ia[j+1]) + { + temp=a[j]; + a[j]=a[j+1]; + a[j+1]=temp; + } + } + cout<<"\nAfter Pass"<