From 16c5b108832e007d0c54963c7ee5f1139626ea6c Mon Sep 17 00:00:00 2001 From: AaronF3PS <43633555+AaronF3PS@users.noreply.github.com> Date: Fri, 16 Oct 2020 20:19:56 +0300 Subject: [PATCH] Create BubbleSort_AJT.cpp Bubble Sort Algorithm - Sorting Algorithms by Aaron --- Intermediate/BubbleSort_AJT.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Intermediate/BubbleSort_AJT.cpp diff --git a/Intermediate/BubbleSort_AJT.cpp b/Intermediate/BubbleSort_AJT.cpp new file mode 100644 index 00000000..6ca550aa --- /dev/null +++ b/Intermediate/BubbleSort_AJT.cpp @@ -0,0 +1,33 @@ +#include +void bubblesort(int a[],int n) +{ + int i,j,k,temp; + for(i=0;ia[j+1]) + { + temp=a[j]; + a[j]=a[j+1]; + a[j+1]=temp; + } + } + printf("The resultant array in this iteration is\t"); + for(k=0;k