Hello, I had ran into a very difficult problem in my CS110 class in University. The problem asks us to use if statements to take 5 random inputted float numbers: ie. 5.63, 10.5, 16.7, 20.6 & 10.9 and take the median value, Ie the value that is in the middle. In this case it would be 10.9. I had thought of taking each inputted number and using > statements to find out which is smallest/largest and thought this would become very time consuming, because, obviously the numbers are inputted in no specific order.
Perhaps using a flag and find the lowest and highest value of the 5, and then taking the middle between those three would somehow work. Its the last question of the chapter, and there is nothing in the notes that discusses how to figure it out. Thus the class is called Programming and Problem Solving for Engineers