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
VladimirAG [237]
3 years ago
12

What is the final amount stored in value if the computer selects 17 as the

Computers and Technology
1 answer:
nadya68 [22]3 years ago
6 0

Answer: -17

Explanation:

Our random number is 17. Let's go through line by line.

  1. value is a random number picked which is 17
  2. valueB = 17 / 2 = 8.5
  3. If value is greater than 0 AND value has a remainder of 1, we will set the value to value* -1.
  4. Value is now 17 * -1 = -17

Let's quickly calculate value mod 2. 17 % 2 = is 1. If you're wondering how we did that, the remainder after dividing 8 into 17 twice is 1, because 17 - 16 = 1.

We stop after line 4 because we stop the conditional statement after one condition is filled.

You might be interested in
Be your self today!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Georgia [21]

Answer:

So, Do my work quickly get an A+ and play ro blox for the rest of the day?

5 0
2 years ago
Which number expresses 6.72 as a fraction in simplest form?<br>​
Ymorist [56]
What are the answer choices
8 0
3 years ago
What is a output devices?
V125BC [204]
Any piece of computer hardware equipment which converts information into a human-perceptible form or, historically, into a physical machine-readable form for use with other non-computerized equipment. It can be text, graphics, tactile, audio, or video.
3 0
2 years ago
Read 2 more answers
Showrooming is associated with apps designed to fulfill which primary motivation?
Luden [163]
300 because it was good for it
6 0
3 years ago
What is a computer in daily life​
kvv77 [185]

Answer:

The use of computers on a regular basis in our life is very important. Technically in daily life computer is used to convert raw facts and data into meaningful information and knowledge. Computer science is explored and challenged by humans daily. The computer is like an electronic magical device for our life.

Explanation:

6 0
3 years ago
Other questions:
  • How can i do a back up on one computer and save it to the hard drive in another computer without it being seen by others on the
    9·1 answer
  • What are the advantage of transistors over vacuum tubes?
    6·1 answer
  • The soft-tissue lining of oysters and clams creates pearls. Is a pearl a mineral?
    13·2 answers
  • A virus is a self-replicating program that produces its own code by attaching copies of it into other executable codes.
    7·1 answer
  • As the senior analyst responsible for data staging, you are responsible for the design of the data staging area. If your data wa
    10·1 answer
  • Empty parentheses following a function name in a function definition indicate that the function does not require any parameters
    7·1 answer
  • What is adobe photoshop?
    10·2 answers
  • Write a program that prompts the user for a word or phrase, and determines if the entry is a palindrome. A palindrome is a word
    9·1 answer
  • he superclass Student contains: a constructor that accepts a String corresponding to the name of the school the student attends
    15·1 answer
  • What does the top level domain in a url inducate? A. The organization or company that owns the website. B. The organization or c
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!