diff --git a/BubbleSort/AmodhShenoy.c b/BubbleSort/AmodhShenoy.c new file mode 100644 index 000000000..0aadcc0d6 --- /dev/null +++ b/BubbleSort/AmodhShenoy.c @@ -0,0 +1,39 @@ +#include +#include +using namespace std; +int main() +{ + int n,temp; + int a[200]; + while(true) + { + cout<<"Enter the number of elements"<>n; + if(n<=200) + { + cout<<"Enter the elements"<>a[i]; + for(int j=n-1;j>0;j--) + { + for(int k=0;ka[j+1]) + { + temp=a[j]; + a[j]=a[j+1]; + a[j+1]=temp; + } + } + } + cout<<"The sorted elements are:"; + for(int l=0;l