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
labwork [276]
3 years ago
9

Create the arrays and assign randomized values for each element in the array. The randomized values should range from 1 to twice

the size of the array. For example, for an array of 200, assign random values between 1 and 400. Use a constant for the size of the array. Edit the value of the constant in different runs of the program to account for the various array sizes.
Computers and Technology
1 answer:
lutik1710 [3]3 years ago
4 0

Answer:

In Java:

import java.util.Random;

public class Main {

  public static void main(String[] args) {

      final int arrsize = 10;

     Random rd = new Random();

     int[] arr = new int[arrsize];

     for (int kount = 0; kount < arrsize; kount++) {

        arr[kount] = rd.nextInt(arrsize*2-1) + 1;

        System.out.print(arr[kount]+" ");      }   }}

Explanation:

This declares the array size as a constant integer

      final int arrsize = 10;

This creates a Random object

     Random rd = new Random();

This declares an array of arrsize size

     int[] arr = new int[arrsize];

This iterates through the array

     for (int kount = 0; kount < arrsize; kount++) {

This generates the random values between 1 and arrsize * 2

        arr[kount] = rd.nextInt(arrsize*2-1) + 1;

This prints the elements of the array

        System.out.print(arr[kount]+" ");      }

You might be interested in
I need it ASAP, brainliest to whoever answers correctly!
velikii [3]

Answer:

E

Explanation:

i think it is E because if you think about it they don't make everything accurate on normal mapping its just to give you an idea of where to go or find.

6 0
3 years ago
____ allows you to control how objects enter, move on and exit slides
coldgirl [10]
The mouse allows you to do all three of those tasks
4 0
3 years ago
Provided you have an Internet connection and functional Web browser, gather information on three different commercial RAID contr
aalyn [17]

Answer:

1). Serial ATA (SATA): SATA drives are base hard drives. Serial ATA was designed to  replace the older parallel ATA (PATA) standard (often called by the old name IDE), offering several advantages  over the older interface: reduced cable size and cost (7 conductors instead of 40), native hot swapping, faster  data transfer through higher signaling rates, and more efficient transfer through a I/O queuing protocol. On  some systems without a controller, these can be cabled instead to the onboard SATA connections on the  motherboard. On smaller servers with a controller, they can still be cabled because these systems will not have  a backplane. Cabled hard drives are not hot swappable.

2). Near Line SAS: Near Line SAS are enterprise SATA drives with a SAS interface, head, media, and rotational  speed of traditional enterprise-class SATA drives with the fully capable SAS interface typical for classic SAS

drives. This provides better performance and reliability over SATA. Basically it is a hybrid between SATA and SAS.

3). Serial Attached SCSI (SAS): SAS is a communication protocol used in Enterprise hard drives and tape drives.  SAS is a point-to-point serial protocol that replaces the older based parallel SCSI bus technology (SCSI). It uses  the standard SCSI command set. These have extra connections through the top of the SATA connection. These  are the top end in performance for electromechanical drives.

4). Solid-State Drive (SSD): An SSD is a data storage device that uses integrated circuit assemblies as memory to  store data persistently. SSD technology uses electronic interfaces compatible with traditional block  input/output (I/O) hard disk drives. SSDs do not employ any moving mechanical components, which  distinguishes them from traditional magnetic disks such as hard disk drives, which are electromechanical  devices containing spinning disks and movable read/write heads. Compared with electromechanical disks, SSDs  are typically less susceptible to physical shock, are silent, and have lower access time and latency. Typically  because of these features, SSD drives can be the fastest I/O in the market today in standard hard drive form factor.

Explanation:

5 0
4 years ago
Write a program that passes an unspecified number of integers from command line and displays their total.
Svetradugi [14.3K]

Answer:

Explanation:

I will go straight to the code, and hope it didn't confuse you.

Here is it

public static void main(String[] args)

int [] x = new int [args.length]

for (int y = 0; y< args.length;yi++)

int[y] = (int) args [y]

5 0
3 years ago
HOW CAN A PERSON GET BENEFITTED BY THE ICT BASEDSERVICES PROVIDED BY GOVERNMENT
BARSIC [14]

Answer:

Explanation:

It aims to transform the entire ecosystem of public services through the use of information technology.ICT holds particular promise in areas of governance and public participation.  Age can use information to reduce corruption and increase government transparency, accountability, efficiency and so finally gud night guys and take care.

plz mark as brainliest

5 0
3 years ago
Other questions:
  • What are some examples for Environmental Technology?
    5·2 answers
  • I’m having trouble with my computer. It’s stuck on this automatic repair screen and every time I try to reset it, it says “Your
    5·1 answer
  • Which option should u select to ignore all tracked changes in a document
    8·1 answer
  • Which of the following are types of home internet service? Check all that apply
    7·1 answer
  • "This part of the computer fetches instructions, carries out the operations commanded by the instructions, and produces some out
    15·1 answer
  • What the heck is a motherboard and why is my computer not working when i take it out
    14·1 answer
  • The lenght of a formula Can't be more than ________ characters​
    11·2 answers
  • Convert Fahrenheit to Celsius using this formula: F = (9/5)*C+32
    5·1 answer
  • Consider a computer that uses 5 bits to represent positive integers and uses all 5 bits to represent the value.
    9·1 answer
  • Need comments added to the following java code:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!