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
Why do some people argue that tech companies like Apple should do more to address the smartphone addiction problem?
Neko [114]

Answer:

Cause It Will Help Make A Fix For The Issue

Explanation:

Does This Help?

5 0
3 years ago
1. Jaina is a big fan of a popular comic book series, and is so inspired that she decides to write her own story. She starts her
dolphi86 [110]

Answer:

copyright infringement

Explanation:

4 0
3 years ago
Given that a function receives three parameters a, b, c, of type double , write some code, to be included as part of the functio
hoa [83]

Answer:

   public static void quad(double a, double b, double c) {

       double D = (Math.pow(b, 2)) - (4 * a * c);

       if (D<0){

           System.out.println("no real solutions");

       }

   }

Explanation:

The code snippet above implements the function in Java programming language

As required by the question, the line  double D = (Math.pow(b, 2)) - (4 * a * c); evaluates b squared" - 4ac and assignes the value to the variable D

An if statement is used to test if D is less than 0, if this is true the message no real solutions is printed

5 0
3 years ago
Please someone helppppppp
Cerrena [4.2K]

Answer : communicate is the answer.

5 0
2 years ago
Read 2 more answers
________ is the set of instructions that programmers have written in a higher-level language. select one:
kicyunya [14]
The answer is a. Source Code.   It is the set of instructions that programmers have written in a higher-level language.  When a programmer types a sequence of C language<span> statements into Windows Notepad, for example, and saves the sequence as a text file, the text file is said to contain the source code. </span>
6 0
3 years ago
Other questions:
  • I really need help please abari is writing a program which prompts a user for a value without a decimal. Which function should h
    8·1 answer
  • Your assignment is to write an assembly language program which read a string and print it in uppercase. This program asks the us
    15·1 answer
  • Programming challenge description: Given a string comprising just of the characters (,),{,},[,] determine if it is well-formed o
    13·1 answer
  • In DTP, a good rule of thumb is to use as many special effects as you need to make your documents look interesting.
    5·1 answer
  • William found out that someone used his report on american culture without his permission. what is william a victim of?
    11·1 answer
  • A network administrator is reviewing a network design that uses a fixed configuration enterprise router that supports both LAN a
    8·1 answer
  • BRAINLIEST BRAINLIEST BRAINLIEST BRAINLIEST BRAINLIEST BRAINLIEST BRAINLIEST BRAINLIEST BRAINLIEST BRAINLIEST BRAINLIEST BRAINLI
    6·2 answers
  • Computer spreadsheet is a grid of​
    9·1 answer
  • Is social media bringing people together or cause in sepretation?​
    11·2 answers
  • There are some games that cannot be described by a single--or even two-- genres. Can you think of any that should be invented?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!