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
MrRissso [65]
4 years ago
12

The code segment below is intended to randomly print one of the values 2, 4, 6, or 8 with equal probability.

Computers and Technology
1 answer:
WARRIOR [948]4 years ago
3 0

Answer:

D. (int) (Math.random() * 4 + 1)

Explanation:

The first two options (A and B) will give a compiler error incompactible types since the Math.random() functions returns a double and val has been declared as an int. To overcome this, a type casting to integer is carried out. Option D (int) (Math.random() * 4 + 1)  will return a value after been casted to an int of 1,2,3,4 which when this line val *= 2; is executed gives the expected output of  2,4,6 or 8.

You might be interested in
A combined counting and logical looping statement may be needed in the following situations: (a). The values stored in a linked
sergejj [24]

Answer:

a i think

Explanation:

5 0
2 years ago
A numbered list is best suited for steps that need to be done in _______________________ . [Create Bulleted and Numbered Lists]
kap26 [50]

Answer:

Order.

Explanation:

Microsoft Word refers to a word processing software application or program developed by Microsoft Inc. to enable its users to type, format and save text-based documents.

In Microsoft Word 2019, the users are availed with the ability to edit the word document in the following view type;

I. View Mode.

II. Print Mode.

III. Drift Layout.

A numbered list can be defined as a list of items that are ordered numerically or sorted sequentially.

A numbered list is best suited for steps that need to be done in order, usually in an ascending order. Thus, a numbered list is an ordered list that starts from 1.

To create a numbered list in Microsoft Word, you should press 1 followed by a period, leave a space, type a text and then press the enter button.

5 0
3 years ago
If you were a developer of software, what kind of software package would you develop? why ?​
Goshia [24]

Answer:

Software that would help my grandparents in the North end much money and help stop post harvest loss due to inadequate weather information Climate change etc

Explanation:

The app willbe able to tellif a soil is suitable forCropsthrough my othertechnologiesthat willcome with app it will alsodetect the whetherpattern accuratelyprovide securityin the farmand help farmers selltheir products online

7 0
3 years ago
Kyra is protesting corruption in the mayoral office. She is afraid that the mayor has access to her emails where she discusses h
Marianna [84]

Answer: B. Electronic Communications Privacy Act

Explanation: If you look up what  Electronic Communications Privacy Act it tells you the answer in the meaning or definition. Therefore Electronic Communications Privacy Act is the correct answer. Please rate me a 5/5. Your welcome.

3 0
3 years ago
How can you implement a framework?
Cloud [144]

Answer:

that's the answer

Explanation:

I hope it helps to you

5 0
3 years ago
Other questions:
  • explain why electronic file organization is a key skill for today’s workplace. You may use a scenario from your current and/or f
    8·1 answer
  • How many packets does your computer send/receive in a single mouse click when you visit a website?
    6·1 answer
  • You want to place a video from the internet to your desktop. what process do you use?
    15·1 answer
  • What does the Auto Fill tool do?
    15·2 answers
  • Consider the clipping of a line segment in two dimensions against a rectangular clipping window. Show that you require only the
    10·1 answer
  • Stella is a bank executive. She is preparing a spreadsheet on the loan repayment schedules of customers. Which function can she
    12·1 answer
  • Computer trespass can be harmless.<br> a. True<br> b. False
    15·2 answers
  • Interface elements include but are not limited to:
    8·1 answer
  • Write a 10 sentence paragraph about george washington and abraham lincoln and no plagiarism
    8·2 answers
  • It is where the home tab is located where you can view all the all the formatting purpose <br>​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!