From 9f2f88d877fc9aa9aca2fac580bf77cd5ddd6fe7 Mon Sep 17 00:00:00 2001 From: catchmeifyoucanisalreadytaken <31013625+catchmeifyoucanisalreadytaken@users.noreply.github.com> Date: Fri, 25 Oct 2019 13:43:15 +0530 Subject: [PATCH] Create Insertion Sort C++ --- Insertion Sort C++ | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Insertion Sort C++ diff --git a/Insertion Sort C++ b/Insertion Sort C++ new file mode 100644 index 00000000..a4021ef7 --- /dev/null +++ b/Insertion Sort C++ @@ -0,0 +1,32 @@ +//Insertion Sort +#include +#include +void insertion_sort(int[],int); +void main() +{clrscr(); +int const size=5; +int a[5],i; +cout<<"Enter values for array elements: "<>a[i]; +cout<<"Entered values of array elements before sorting are: "<=0)) +{a[j+1]=a[j]; +j--; +} +a[j+1]=temp;} +cout<<"The sorted values of array elements are: "<