From b2e8dc7566a5c41c7ff4ac2e4bff64f07321cc96 Mon Sep 17 00:00:00 2001 From: Jupin Lathiya <89475279+jupinlathiya@users.noreply.github.com> Date: Thu, 14 Oct 2021 17:16:50 +0530 Subject: [PATCH] fixed error and correct bubble sort --- modified bubble sort.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 modified bubble sort.c diff --git a/modified bubble sort.c b/modified bubble sort.c new file mode 100644 index 0000000..1f2fa1b --- /dev/null +++ b/modified bubble sort.c @@ -0,0 +1,33 @@ +#include +int main() +{ + int a[100],n,i; + printf("\n Enter the size of array : "); + scanf("%d",&n); + printf("\n Enter array : \n"); + for(i=0;ia[j]) + { + temp=a[i]; + a[i]=a[j]; + a[j]=temp; + } + } + } + printf("\n Your sorted array is : "); + for(i=0;i