diff --git a/Array Sorting/Insertion.java b/Array Sorting/Insertion.java new file mode 100644 index 0000000..3182479 --- /dev/null +++ b/Array Sorting/Insertion.java @@ -0,0 +1,48 @@ +/*RockLee444*/ +import java.util.Scanner; +public class Insertion{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int[] data = new int[1]; //Initializing array + int size=0,error=0; //Initializing variables + do{ + error=0; + System.out.println("How many numbers do you wish to sort?"); + size = sc.nextInt(); + if(size>0){ + data = new int[size]; + for(int i=0;i0 && aux