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
6x+12 in its simplest form?
denis23 [38]

Answer:

It is already in simplest form.

Step-by-step explanation:

3 0
3 years ago
Read 2 more answers
Find the surface area of the composite figure
nataly862011 [7]

solution given:

For Cuboid

length[l]=11mm

breadth [b]=9mm

height[h]=6mm

For semi cylinder

height[H]=11mm

radius[r]=\frac{9}{2}=4.5mm

Now

Totalsurface area=2(lb+bh+lh)+½(2πr(r+H))-l*b[/tex]

:2(11*9+9*6+11*6)+22/7*4.5(4.5+11)-11*9

:438+219.2-99

:558.2mm²

Here area of base is subtracted as it is not included.

<u>T</u><u>o</u><u>t</u><u>a</u><u>l</u><u> </u><u>s</u><u>u</u><u>r</u><u>f</u><u>a</u><u>c</u><u>e</u><u> </u><u>a</u><u>r</u><u>e</u><u>a</u><u> </u><u>o</u><u>f</u><u> </u><u>c</u><u>o</u><u>m</u><u>p</u><u>o</u><u>s</u><u>i</u><u>t</u><u>e</u><u> </u><u>f</u><u>i</u><u>g</u><u>u</u><u>r</u><u>e</u><u> </u><u>i</u><u>s</u><u> </u><u>:</u><u>5</u><u>5</u><u>8.</u><u>2</u><u>mm²</u><u>.</u>

8 0
3 years ago
Read 2 more answers
PLEASE HELP! 11 POINTS, I KNOW THATS A LITTLE BIT, BUT IF YOU DO HELP WITH THESE 5 EASY QUESTIONS ILL BE SURE TO GIVE U BRAINIES
8090 [49]
There are 159 green apples since 36 apples for each of the 14 baskets is 504 total apples minus 225 red apples and 120 yellow apples leaves the remainder of 159 apples, all of which must be green.

The second and third options are correct for the second image.

Prime factors for 81 is 3x3x3x3.

99 muffins in total since 18 raisin muffins x3 = 54 blueberry muffins /2 = 27 banana muffins, so 18+54+27=99.

394 markers total since 15 markers to each of 18 students = 270 markers given out plus the remaining 124 is 394.
4 0
3 years ago
A sphere has a volume of 523.33 cubic centimeters what is the diameter in centimeter of the sphere?
dmitriy555 [2]
The diameter would be approximately <span>3.19 centimeters.

</span>r=(3 V4/π) * ⅓

Plug everything in and multiply the radius by 2 to get your diameter. 


6 0
3 years ago
Can someone help asap
Galina-37 [17]

Answer:

37.2m^3

Step-by-step explanation:

Given: The dimension of a cuboid

l(length)=6.2m\\w(width)=2.4m\\h(height)=2.5m

To Determine: The volume of the container

The volume of a cuboid is calculated by the formula below:

V cuboid=lxwxh

Substitute into the formula the given dimensions

V container=6.2m x2.4mx2.5m\\V container=37.2m^{3}

Hence, the volume of the container is 37.2m^3

4 0
2 years ago
Other questions:
  • Every morning for the past 12 days, Beth used 2/3 of a cup of milk on her cereal. To determine how much milk she used in total,
    8·2 answers
  • Mrs. Nelson has a rectangular flower box that is 5 feet long and 2 feet tall. She wants the width of the box to be no more than
    5·1 answer
  • Please help I need your it please
    9·1 answer
  • Volume scale factor, help needed.
    11·1 answer
  • This is worth 25 points.
    14·1 answer
  • What is f(5) for f(x)=4x^2-5x+2?<br> A)-24<br> B)77<br> C)127<br> D)150
    9·2 answers
  • The U.S. quarter has a mass of 5.67 g and is approximately 1.55 mm thick.How many quarters would have to be stacked to reach 575
    12·1 answer
  • Write the equation of the line that passes through the points (8, –1) and (2, –5) in standard form, given that the point-slope f
    14·1 answer
  • the population of red tailed squirrels in Oklahoma is currently estimated to be 2.5 million and is expected to grow at an annual
    8·1 answer
  • What is the Tan J? URGENT HELP PLS
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!