Need help in Array Problem !!!


Hello guys ,

I'm working in a project about array which asks me to sort the array in ascending and descending order . Then to find the max, min, and the mean of this array . I got them all.

But at the end I have to prompt the user to enter a new value ,
Now I need to indicate where in the array this new value would fall if it were to be inserted into the array ( the ascending order array ) ??!
what should i do for this last step ? Help please !

Thanx .
Last edited on

Hello iSo ,

You can do this by looping through the array until you find an element less than the one the user entered . Then you can print out the index of this element .

You're welcome .
Last edited on

Hello L B ,

I'm good now , thank you so much for your help : )

...
Topic archived. No new replies allowed.