Program is giving wrong output
Description
try the program with input
Enter number of elements of array
10
Enter Element 0
-10
Enter Element 1
78
Enter Element 2
-1
Enter Element 3
-6
Enter Element 4
7
Enter Element 5
4
Enter Element 6
94
Enter Element 7
5
Enter Element 8
99
Enter Element 9
0
Expected Behavior
Expected the correct sorted array
Actual Behavior
getting this wrongly sorted array output
Sorted Output
-10
-6
78
7
4
-1
5
0
94
99