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
Fill in the blank with the correct response.
Verizon [17]

Answer:

File structure.

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

Generally, all HTML documents are divided into two (2) main parts; body and head. The head contains information such as version of HTML, title of a page, metadata, link to custom favicons and CSS etc. The body of the HTML document contains the contents or informations of a web page to be displayed.

The file transfer protocol (FTP) client component of a full-featured HTML editor allows you to synchronize the entire file structure. Therefore, when you wish to share your entire html document over a network server such as a FTP client, you should use a full-featured HTML editor.

6 0
3 years ago
The what toolbar can be customized to the preferences of the user
schepotkina [342]
Is this a multiple choice question?
7 0
4 years ago
Read the code below.
Rasek [7]

Answer:

theres an error on line one used python idle

Explanation:

8 0
4 years ago
After Intel faced strong shifts in technologies, such as cloud services, social networking, mobile devices, etc., Intel realized
Crazy boy [7]

Answer:

d. Information governance board

Explanation:

In 2004 <em>Intel </em>was in need of a governance process as part of the company’s policy of <em>Intel’s Information Management (IMM)</em>. Such policies and governance were important in the corporation’s process in order to mirror the local laws as well as to reproduce Intel’s dynamic nature of its activities as a corporation. The <em>Information Governance Boards </em>were intended for every main data area of the company: <em>location, item, finance, customer, supplier, and worker</em>. Such Governance Boards would engage business people in the company to  embrace the stipulated policies also with the purpose of proptecting information.

8 0
3 years ago
What actions are considered positive body language?
Ainat [17]

Answer:

Greeting with a smile, open handed gestures, and making eye contact

Explanation:

I used this on E2020 and got it right

5 0
3 years ago
Other questions:
  • Hy i am new anybody here​
    10·2 answers
  • Which of the following events would most likely produce an earthquake
    10·1 answer
  • Explain the factors involved in selecting a routing protocol to be used on a network.
    12·1 answer
  • The problem identification document commits the final and complete problem specification to paper and guides the software develo
    10·1 answer
  • What is the reason of non-deterministic (indeterminate) behavior of concurrent programs?
    9·1 answer
  • Which symbol is at the beginning and end of a multiline comment block? &amp;&amp;&amp; """ %%% ###
    5·1 answer
  • What is file management?can please help me​
    14·2 answers
  • Widow in respect to word processing ​
    15·1 answer
  • Bob has started a company and registered its name with the government as a private corporation. He tries to create a domain name
    12·1 answer
  • A(n) ______is like an intranet except it shares its resources with users from a distant location. Select your answer, then click
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!