Final answer:
To solve this problem, you can use a for loop to iterate up to 15 times and prompt the user to enter a number each time. After the loop, calculate the count of numbers entered, the average of these numbers, and the distance of each number from the average.
Step-by-step explanation:
To solve this problem, you can use a for loop to iterate up to 15 times and prompt the user to enter a number each time. Inside the loop, store each entered number in an array. If the user enters 99999, break out of the loop. After the loop, check if the array is empty. If it is, display an error message. Otherwise, calculate the count of numbers entered and the average of these numbers. Then, iterate over the array again and calculate the distance of each number from the average. Finally, display all the calculated values.