I have written this code that reads 10 integers from the user, stores them in an array, then calculates and prints the average. It is also supposed to print the numbers in the array that are greater than or equal to the average. Instead, my code prints out every number in the array. How can I fix this?
Also, if anyone has any tips on how to simplify this code, that would be much appreciated, as well.