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
Answers please !!!!!!!!!!!!!!!!!!!!!!!!!!!
alina1380 [7]
Hard to see please add a better image. Actually just type out the question.
4 0
3 years ago
What is the first thing you should do when you discover a computer is infected with malware? The second thing?
Goshia [24]

Answer:

Quarantine the computer.

Explanation:

Malware can be characterized with negative software capable of causing various damages to a computer, such as theft of data and information, in addition to damage to devices.

In order to avoid having your computer infected with malware, it is essential to have installed reliable malware-checking software, in addition to taking all appropriate security measures when accessing the internet and never clicking on unknown or suspicious links.

Therefore, when realizing that the computer has been infected by malware, it is necessary to quarantine the computer and immediately disconnect from a network so that it does not infect other computers. The quarantine acts as an action where the infected file is moved to an encrypted folder where the malware cannot be executed and spread by the operating system.

3 0
3 years ago
Virtual machines are not susceptible to the threats and malicious attacks like other operating systems.
Nonamiya [84]

Answer:

flamingo was here

Explanation:

3 0
3 years ago
Horizontal cabling Group of answer choices A. is cabling that extends out from the telecommunications closet into the LAN work a
likoan [24]

Answer:B

Explanation:.is cabling that extends out from the work area into the LAN.

4 0
3 years ago
Readable code includes the use of
Kobotan [32]

Answer:

bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBbBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBbbbbbbbbbbbbbbbbbbbbbbbbBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

Explanation:

7 0
2 years ago
Read 2 more answers
Other questions:
  • What privacy issues have arisen with webcams in mobile devices?
    8·1 answer
  • A short-circuit evaluation is where each part of an expression is evaluated only as far as necessary to determine whether the en
    14·1 answer
  • When you boot up a computer and hear a single beep, but the screen is blank, what can you assume is the source of the problem?
    11·2 answers
  • What part of the computer gives access to the internet
    10·1 answer
  • Magnetic ram (mram) uses ____ rather than an electrical charge to store data.
    6·1 answer
  • Mary, Tim, John, and Jenn each sold three million dollars worth of product within six months. Each month one of them was awarded
    12·2 answers
  • Write another function to convert a value to its word equivalent leveraging the following tuple - o Number = (‘One’, ‘Two’, … ‘N
    10·1 answer
  • Given a matrix input_matrix, return a Numpy array that consists of every entry of A that has: an even row index in the range [0,
    9·1 answer
  • One lap around a standard high-school running track is exactly 0.25 miles. Write a program that takes a number of miles as input
    12·1 answer
  • MR. Tom asked her students could they plant a flower and bring it to class. Sarah brought his flower and said it was a rose. Jam
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!