I am trying to generate 100 random numbers between 1 and 1000. Then, I need to find their average and which of them is their maximum. I get a wrong output. How do I fix this?

Thank you very much....