![angelgarcia12379](/avatars/20408.jpg)
angelgarcia12379
19.03.2020 •
Computers and Technology
Write a Java program to generate 200 random integers in the range of 0 and 999 (both inclusive). Then find the appearance frequency of each digit (0-9) in these numbers, and print a frequency histogram.
Solved
Show answers
More tips
- C Computers and Internet Why is Yandex s robot Bless.yandex.ru Important?...
- S Science and Technology How to Restore the Diamond Shine to Your Tarnished Silverware...
- C Computers and Internet What Are Peers and Seeds in Torrenting?...
- L Leisure and Entertainment How to Find a Phone Number by Address: The Ultimate Guide...
- F Food and Cooking Pu-erh Tea: History, Varieties, Benefits, and Risks...
- S Style and Beauty Why is Sugaring Better than Waxing for Hair Removal?...
- C Computers and Internet How to Delete a Page on VKontakte: The Ultimate Guide from Experts...
- F Food and Cooking How to Make Delicious Plov: Secrets and Recipes...
- H Health and Medicine 10 Simple Techniques on How to Boost Your Mood...
- L Leisure and Entertainment Unlocking the Secrets of Winning the Lottery...
Answers on questions: Computers and Technology
- C Computers and Technology HELP ME PLEASE PLEASE PLEASE In your own words, describe in detail the different types of image licensing. How does image metadata play a role in these licenses and why is that...
- C Computers and Technology ASAPPlease help 15 pointsWill be marked as brainliest:)...
- M Mathematics When posed with the question Do you believe the Loch Ness monster exists, out of 21,346 responses, 64% were yes. Using a 0.01 significance level to test a claim that most people...
- M Mathematics The volume of air in a balloon is represented by the function von = n, where r is the radius of the balloon, in inches. The radius of the balloon increases with time, in seconds,...
- S Social Studies Explain this passage in The Republic, Plato; In any branch of knowledge or ignorance, do you think that a knowledgeable person would intentionally try to take more for himself...
- B Business ssued 10,800 shares of common stock at $6.00 per share. Issued 20,400 shares of common stock at $8.20 per share. Reported a net income of $108,000. Paid dividends of $59,000. Purchased...
- M Mathematics At a coffee shop, the first 100 customers orders were as follows....
- M Mathematics please help me I’m begging you. I need the right answers and an explanation how you got that right answer. thanks...
- B Business Chang Industries has 1,600 defective units of product that already cost $42 each to produce. A salvage company will purchase the defective units as is for $19 each. Chang s production...
- M Mathematics MATH HELP ASAP TYSM 10 POINTS Evaluate if x = -7, y = 8, and z = -14....
Ответ:
import java.util.Random;
public class ArrayBar {
public static void main(String[] args) {
int arr[] = new int[10];
Random r = new Random();
int n = 0;
for (int i = 0; i < 200; i++) {
n = r.nextInt(1000);
while (n > 0) {
arr[n % 10]++;
n = n / 10;
}
}
for (int i = 0; i < 10; i++) {
System.out.print(i + " (" + arr[i] + "): ");
for (int j = 0; j < arr[i]; j++) {
System.out.print("*");
}
System.out.println();
}
}
}
Explanation:
Ответ: