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
UNO [17]
3 years ago
11

What are the values of i and j after the following code snippet is run? int i = 10; int j = 20; int count = 0; while (count <

5) { i = i + i; i = i + 1; j = j - 1; j = j - j; count++; } System.out.println("i = " + i + ", j = " + j);
Mathematics
1 answer:
AlexFokin [52]3 years ago
6 0

Answer:

i = 351, j = 0

Step-by-step explanation:

The while loop runs 5 times as indicated by the variable, count.

The variable, i, has an initial value of 10. The first line of the loop code doubles the value of i while the second increments it by 1. This is done 5 times. We have

Iteration 1: i = 10 + 10 + 1 = 21

Iteration 1: i = 21 + 21 + 1 = 43

Iteration 1: i = 43 + 43 + 1 = 87

Iteration 1: i = 87 + 87 + 1 = 175

Iteration 1: i = 175 + 175 + 1 = 351

The third line of the loop code decrements j by 1. However, the fourth line sets j = 0 by subtracting it from itself. Hence, j is always 0 at the end of the loop, no matter its initial value or the number of iterations.

Thus, at the end of the code snippet, i = 351 and j = 0.

You might be interested in
Describe the transformation(s) of the parent function
natta225 [31]

Answer:

Vertical stretching by a factor of 12, followed by upward translation of 2 units.

Step-by-step explanation:

Let's assume you're starting with f(x), the parent function.

Multiplying f(x) by 12 will stretch the graph vertically by a factor of 12.  A point (1,1) on the graph of f(x) will re-appear as (1,12) after this vertical stretching.  Once you've done that, translate the entire graph upward by 2 units.

7 0
3 years ago
Parallelogram PARL is similar to parallelogram WXYZ. If AP = 15, PL = 40, and WZ = 120, find the value of c .50 110 6 45
vova2212 [387]

Answer:

Option D. c = 45 will be the answer.

Step-by-step explanation:

In the figure attached there are two similar parallelograms PARL and WXYZ.

In which AP = 15, PL = 40, WZ = 120 and WX = c

By the property of similarity, corresponding sides of the given parallelograms will be in the same ratio.

\frac{PL}{WZ}=\frac{PA}{WX}

\frac{40}{120}=\frac{15}{c}

c = \frac{15\times 120}{40} [By cross multiplication]

c = 45

Therefore, Option D. c = 45 will be the answer.

4 0
3 years ago
Simplify the expression. Write your answer as a power.
nekit [7.7K]

Answer:

either 2^8/3^8 or 256/6561

Step-by-step explanation:

looked it up on Symbolab

5 0
3 years ago
HELP NOW!!!!
VMariaS [17]

Using the concept of probability and the arrangements formula, there is a  

0.002 = 0.2% probability that the first 8 people in line are teachers.

----------------------------------

  • A probability is the <u>number of desired outcomes divided by the number of total outcomes.</u>
  • The order in which they are positioned is important, and all people will be positioned, and thus, the arrangements formula is used to find the number of outcomes.

The number of possible arrangements from a set of n elements is given by:

A_n = n!

----------------------------------

The desired outcomes are:

  • First 8 people are teachers, in <u>8! possible ways.</u>
  • Last 4 are students, in <u>4! possible ways.</u>

Thus, D = 8! \times 4!

----------------------------------

For the total outcomes, <u>number of arrangements of 12 people</u>, thus:

T = 12!

The probability is:

p = \frac{D}{T} = \frac{8! \times 4!}{12!} = 0.002

0.002 = 0.2% probability that the first 8 people in line are teachers.

A similar problem is given at brainly.com/question/24650047

7 0
3 years ago
What equation do you get when you solve z-m=z+bx for x
Sonbull [250]
Z-m=z+bx

z-m-z=z+bx-z

-m=bx

bx=-m

bx/b=-m/b; b=0

x=-m/b; b=0
5 0
3 years ago
Other questions:
  • Answer #3 please {}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}
    12·2 answers
  • Cecilia is making shorts with 8 belt loop. To make the loops, she needs 8 strips of fabric. Each strip measures 1 1/4 inches wid
    11·1 answer
  • X =<br> 1. 4<br> 2. 7<br> 3. 9<br> (Special Segments)
    15·1 answer
  • Please help me with this!! &lt;3
    15·1 answer
  • Using the quadratic formula to solve x2 = 5 – x, what are the values of x?
    12·2 answers
  • Assume there are 200 mendaliens living on an island in my back yard. if my island has an area of 20 hectares, what is the popula
    5·1 answer
  • X square Y - x y square x cube minus x square y.​
    9·1 answer
  • (1, 72), (3,66), (5, 53), (7, 40), (9, 34)
    15·1 answer
  • Which expression is equivalent to<br> 1940<br> ?<br> 2<br> 0<br> 27<br> 꾧<br> 3.6<br> 0<br> -<br> 3
    11·1 answer
  • 1.9^4 × 10 × 2.9 x 10^1
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!