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
Which of these lights is NOT part of the standard three-point lighting setup?
Contact [7]

Answer:

i believe background lighting

8 0
3 years ago
Driving is expensive. Write a program with two inputs, a car's miles/gallon and the cost of gas/gallon both represented as doubl
Nataly_w [17]

Answer:33

Explanation:

6 0
3 years ago
The numeric keys on a keyboard or calculator are referred to as a:
Anna [14]

Numeric Keypad is the answer

6 0
3 years ago
Help me<br> please help me helping me is good help me
laiz [17]

Explanation:

Output will be 4.

STAY SAFE, STAY HAPPY

7 0
3 years ago
Match the part of the browser window to the correct description.
hodyreva [135]

Answer:

1. Tabs: allows you to drag the window to a new location

Explanation: Tab is the key that is used to switch between different windows or websites that are opened at a time. This can be done by pressing Ctrl+Tab

2. Status Bar: displays whether the Web page is secure or not

Explanation: Status bar is used to show the status or information related to that page. Like Information related safety precaution.

3. Title Bar: allows you to quickly move between different Web sites

Explanation: Title bar consist of the name of different websites that are open at particular time. This shows at the top of the browser. We can quickly move on different websites using title of website.

4. Bookmarks: save Web addresses so you can return to them quickly

Explanation: Bookmarks are the pages that we save in bookmark menu, to re-open the page whenever its needed.

4 0
3 years ago
Other questions:
  • Assume a program requires the execution of 50 x 106 (50e6) FP instructions, 110 x 106 (110e6) INT instructions, 80 x 106 (80e6)
    12·1 answer
  • Most students overestimate their skill level and abilities to take open book tests.
    11·2 answers
  • Which of the following is the term for software that automatically displays or downloads unwanted offers?
    15·1 answer
  • LargeCo is planning a new promotion in Alabama (AL) and wants to know about the largest purchases made by customers in that stat
    7·1 answer
  • Que son los sistemas de control con retroalimentacion
    10·1 answer
  • What is the main feature of chat rooms?
    9·2 answers
  • Create an array of numbers filled by the random number generator. (value = (int)(Math.random() * 100 + 1);) Print the array and
    9·1 answer
  • Rhea has been asked to interview the new CEO of an energy company. She has scheduled a meeting with him in the company’s meeting
    9·2 answers
  • Karin realized that a song takes up a lot more space on her computer than the lyrics of the song typed out in ms word document .
    12·1 answer
  • Write a program that prompts the user to enter a date, using integer values for the month, day, and year, and then prints out th
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!