0

Why this code doesn’t work always?

https://code.sololearn.com/cNpTEXbbj26X/?ref=app This code gets like input the value int lung, that is the dimension of the array, after that it gets the array with a for loop. In the code there are 4 recursive functions: -Ordina, that orders the elements of the array in crescent mode -min, that should return the minimum element of the array -max, that should return the maximum element of the array -posmin, that should return the position of the minimum element inside the array

13th Dec 2018, 6:36 PM
riccardo
2 ответов
+ 2
What is the problem? Explain what you're getting and what you should get
14th Dec 2018, 1:17 AM
Chriptus13
Chriptus13 - avatar
0
the program should order the elements in the array in a crescent order. for example if the array was 8 4 7 2 10 1, the program should give back 1 2 4 7 8 10. in some case it works well, and in other there is an infinite recursion. I don’t know why
14th Dec 2018, 3:14 AM
riccardo