Write a program that generates one hundred random integers between 0 and 9 and displays the count for each number. Your program must have method that returns the counts for each number.
Hint: Use (int)(Math.random() * 10) to generate a random integer between 0 and 9. Use an array of ten integers, say count, to store the counts for the number of 0’s, 1’s, …, 9’s.
miasuhyla
0
Newbie Poster
Recommended Answers
Jump to Postyou can start by reading java books or online java tutorials on how to make a program
All 3 Replies
Reply to this topic
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.