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
tatuchka [14]
3 years ago
5

What is the value of i after the following code is executed? int i = 1; while ( i < 10 ) { int j = 10; while ( j > i ) j--

; i += j; }
Computers and Technology
1 answer:
natka813 [3]3 years ago
3 0
<h2>The value of "i" after executing the entire code will be "16"</h2>

Explanation:

Initially the value of i will be 1. This value keeps changing after entering the while loop. Let me give you step by step result.

When i = 1, it checks whether i<10, enters the loop, initializes the "j" to 10 and again while loop runs till j>i. so before the outer while loop ends "i" is reinitialized using "i=i+j".

So When i = 1, the value of j after running inner while loop will be 1 and i will be reinitialized to 1+1 = 2, now i =2

So When i = 2,  j =2, Reinitialized value of i = 4

So When i = 4, j = 4, Reinitialized value of i = 8

So When i = 8, j = 8, Reinitialized value of i = 16.

The loop will not get executed thereafter.

You can add the below statement, after "j--;" to understand better.

cout<<"i="<<i<<"," <<"j="<<j<<"\n";

You might be interested in
A coworker asks your opinion about how to minimize ActiveX attacks while she browses the Internet using Internet Explorer. The c
uysha [10]

Answer:

Security Tab is the correct answer.

Explanation:

The Security Tab will enable the users to authorize anyone to use that file or directory.Many clients deleted the security tab because After that nobody can alter the security privileges on the device.

  • With the help of the Security tab, we will minimize the ActiveX attacks on Internet Explorer. This option is available in the Internet Options of the dialog box.
  • Other options are incorrect because they are not related to a given scenario.
8 0
4 years ago
With the range E2:E30 selected, create a new conditional formatting rule that uses a formula to apply yellow fill and bold font
Nana76 [90]

Answer:

Attached are the excel screenshots

3 0
4 years ago
Find the volume of the rectangular prism.<br>1<br>6 cm<br>32<br>cm​
Assoli18 [71]

Answer:

192 centimeters.

Explanation:

V= length x width x height

6 0
3 years ago
If x has a value of 7 and y has a value of 20, what is displayed as a result of executing the code segment
Llana [10]

<em>6.65 </em><em>is displayed as the</em><em> output </em><em>of the </em><em>block of code</em>

<em />

In python programming, * denotes multiplication. To get the output, we will substitute the value of x and y given into the result to have;

<em> result = x * y - x / (y)</em>

<em> result = 7 * 20 - 7 / (20)</em>

<em> result = 140 - 7 / (20)</em>

<em> result = 133/20</em>

<em> result = 6.65</em>

<em />

<em>This shows that </em><em>6.65 </em><em>is displayed as the</em><em> output </em><em>of the </em><em>block of code</em>

<em />

The question is incomplete;

Let the code segment be

<em>>>> x = 7 </em>

<em>>>> y = 20   </em>

<em>>>> result = x * y - x / (y) </em>

<em>>>> result  </em>

<em>output:__?</em>

<em />

Learn more here: brainly.com/question/24240957

5 0
3 years ago
When entering a function or formula in a cell, which is the first character, you must type?
Yakvenalex [24]
Answer A, the equals sign to show that it is a function or formula
3 0
4 years ago
Read 2 more answers
Other questions:
  • The malicious use of computer code to modify the normal operations of a computer or network is called a ___ .
    13·1 answer
  • 5. What are the two main functions performed by UPS​
    12·1 answer
  • In the SoundByte, the Magic Gradient Pen has an algorithm which listens for ________ and then changes the gradient coloring of t
    9·2 answers
  • Professional photography is a competitive job field. <br> true <br> false
    12·2 answers
  • Which of the following factors will have the greatest impact on your credit score?1. Length of credit history 11. Payment histor
    7·1 answer
  • How can our perceptions help us to choose the channel for our message?
    5·1 answer
  • Write the Java code to simulate an inventory control system and a point of sale system with customer history On program start, e
    5·1 answer
  • 1.what is a computer?
    5·1 answer
  • Spoderman memes<br> im scared-
    15·2 answers
  • (10 LC)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!