I need to create a c++ program that asks for ten numbers and outputs the minimum, maximum, average and sum of the numbers. I need to use basic basic coding, so I can not use any arrays or any max or minimum instructions. I am completely lost and this will likely be a question on the final. Can someone please help me in writing and explaining how it works? I would be extremely grateful.
You will have to use a loop because you want to do it 10 times. And you want to keep track of certain things. I could just give you the solution here but then you don't learn anything so I won't do that.
yes, I understand that, but I would like help in arriving at a solution. I know I have to implement a while loop at some point, I assume after I ask the user to enter ten numbers?
So here's what you do. In the loop where you're taking input, store the first input in two variables called (say) min and max. After every input, you compare the input to min and max, if it is greater than max, you replace the value of max with the current input. Same logic with min. At the end, max will have the largest input yet, and min will have the smallest...