1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
FinnZ [79.3K]
3 years ago
14

Create a program that allows the user to pick and enter a low and a high number. Your program should generate 10 random numbers

between the low and high numbers picked by the user. Store these 10 random numbers in a 10 element array and output to the screen.
In java code please.
Computers and Technology
1 answer:
Natalka [10]3 years ago
4 0

Answer:

import java.util.Scanner;

import java.util.Arrays;

import java.util.Random;

public class Main {

 public static void main(String[] args) {

   Scanner scan = new Scanner(System.in);

   System.out.print("Enter low: ");

   int low = scan.nextInt();

   System.out.print("Enter high: ");

   int high  = scan.nextInt();

   scan.close();

   int rndnumbers[] = new int[10];

   Random r = new Random();

   for(int i=0; i<rndnumbers.length; i++) {

     rndnumbers[i] = r.nextInt(high-low+1) + low;

   }

   for(int i=0; i<rndnumbers.length; i++) {

     System.out.printf("%d: %d\n", i, rndnumbers[i]);

   }

 }

}

You might be interested in
you manage a network that has multiple internal subnets. you connect a workstation to the 192.168.1.0/24 subnet. this workstatio
nydimaria [60]

Based on the configuration written below, the most likely cause of the problem is Incorrect subnet mask.

<h3>What is an Incorrect Subnet Mask?</h3>

The issue of an Incorrect Subnet Mask will take place if a network uses a subnet mask that is not theirs for its address class, and a client is still said to be configured with the same default subnet mask for the address class, and thus communication tend to fail to some closeby networks.

Therefore, Based on the configuration written below, the most likely cause of the problem is Incorrect subnet mask.

Learn more about subnet mask from

brainly.com/question/27418272

#SPJ1

See full question below

You manage a network that has multiple internal subnets. You connect a workstation to the 192.168.1.0/24 subnet.

This workstation can communicate with some hosts on the private network, but not with other hosts. You run ipconfig /all and see the following:

Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : mydomain.local Description . . . . . . . : Broadcom network adapter Physical Address. . . . . . : 00-AA-BB-CC-74-EF DHCP Enabled . . . . . . . : No Autoconfiguration Enabled. . . : Yes IPv4 Address . . . . . . . : 192.168.1.102(Preferred) Subnet Mask. . . . . . . . : 255.255.0.0 Default Gateway . . . . . . : 192.168.1.1 DNS Servers . . . . . . . : 192.168.1.20 192.168.1.27

What is the most likely cause of the problem?

8 0
1 year ago
What is an "immediate preemptive scheduler"?
lyudmila [28]
In computing<span>, </span>preemption<span> is the act of temporarily interrupting a </span>task<span> being carried out by a </span>computer system<span>, without requiring its cooperation, and with the intention of resuming the task at a later time.</span>
6 0
3 years ago
Which of the following is NOT a long-term storage device?
neonofarm [45]

The storage device which is not a long-term storage device is: D. RAM.

<h3>Types of computer memory.</h3>

In Computer technology, there are two (2) main types of memory or storage location for software program (application) that are being used on a computer and these include the following;

  1. Read only memory (ROM)
  2. Random access memory (RAM)

<h3>What is RAM?</h3>

RAM is an abbreviation for random access memory and it can be defined as a volatile and temporary storage (memory) location that is used for currently opened software program (application) and computer data.

In conclusion, we can reasonably and logically deduce that the storage device which is not a long-term storage device is random access memory (RAM).

Read more on RAM here: brainly.com/question/13748829

#SPJ1

3 0
1 year ago
Can someone write me a design brief about a stadium​
Delicious77 [7]

Btw..which dtadium do u want cricket or football!?

3 0
2 years ago
Read 2 more answers
You are the manager and an employee shows up for his shift dressed inappropriately for work. What should you do?
yarga [219]

Most managers see inappropriate dressing every day. Some are left angered while some are confused as to what is the right way to approach such situations. What follows next needs to be professional oriented. Being the manager, I would start by finding out what the appropriate dressing policies are. Some companies might have dress code policies while others might not. Assuming that this company has, I would read these policies carefully. The next thing that is required from me is to have a small conversation with the employee discretely. As professional as I can be, I will mention how I feel his or her dress code is inappropriate and try to summon the employee by asking him or her whether they are fully aware of the appropriate dress code. I will try to agree with the employee on what is appropriate and what is not. If we agree, requesting the employee to home and change clothes is unnecessary, but if the need to do that arises, I would consider that to be an option.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following is a Microsoft solution that runs on a Microsoft Terminal Services server but appears, to end users, as i
    10·1 answer
  • Diane wants to maintain a record of grades scored in the fifth, sixth, and seventh grades. She enters her grades and the total p
    13·1 answer
  • Writers should avoid jargon because jargon ______. a. Takes too long to use b. Limits what ideas can be explored c. Conveys too
    12·1 answer
  • Why is self-esteem important in self-representation
    7·1 answer
  • The picture that graphically represents the items you use in windows is called a/an
    5·1 answer
  • To implement a small database, a database designer must know the "1" and the "M" sides of each relationship and whether the rela
    7·1 answer
  • For example, consider a file with protection mode 644 (octal) contained in a directory with protection mode 730. How might the f
    9·1 answer
  • Which of these is a negative effect of computer technology's role in creating
    9·1 answer
  • Working with text in presentation programs is very ____ using text in other applications.
    10·1 answer
  • Which are the top 10 Popular Cars and Video Games get max ammount of point that we can give​
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!