Write a Java program that generates and displays 100 random integers in the range of [10, 25] inclusively. The program then displays the number of occurrences for each number in that range. Next, the program displays the maximum, minimum and average (with exactly 2 digits after the decimal) value of the occurrences
Ken1234
0
Newbie Poster
Recommended Answers
Jump to PostDaniWeb Member Rules (which you agreed to when you signed up) include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments"
http://www.daniweb.com/community/rulesPost what you have done so far and someone will help you from there.
Jump to PostOK, that's a good start. Now for counting the occurrences...
You know the numbers are in the range 10-25, which is a nicely small range - easily small enough to use as the indexes into an array. You could set up an array for the counts, one element for each …
All 8 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Ken1234
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Ken1234
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Ken1234
0
Newbie Poster
stultuske
1,116
Posting Maven
Featured Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured 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.