Write a program that fills a one-dimensional array with 10 random integers between 1 and 25.
The program should perform the following tasks:
1. Print the contents of the array horizontally.
2. Print the sum of the contents of the array.
3. Print the maximum number in the array.
4. Print the minimum number in the array.
5. Print the average of the numbers stored in the array.
Sample Output:
6 14 9 2 24 12 18 15 21 3
The sum of the numbers is: 124
The maximum of the numbers in the array is: 24
The minimum of the numbers in the array is: 2
The average of the numbers in the array is: 12.4
bmwwbb54 0 Newbie Poster
Slavi 94 Master Poster Featured Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
bmwwbb54 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.