itechlanders
itechlanders itechlanders
  • 24-05-2017
  • Mathematics
contestada

How many times does the computer print the string "Hello"? i = 2 while (i < 4) { print ("Hello") i = i + 1}:

Respuesta :

LammettHash
LammettHash LammettHash
  • 24-05-2017
[tex]i=2<4[/tex] is true, so "Hello" is printed, then we increment [tex]i[/tex] by 1.

Now [tex]i=3[/tex] and [tex]3<4[/tex], so "Hello" gets printed again.

Next [tex]i=4[/tex], but [tex]4<4[/tex] is false, so the while loop is broken.

So, the loop only prints "Hello" twice.
Answer Link

Otras preguntas

This is math. Please help due soon.
Mohandas gandhi was assassinated as a consequence of:.
An isosceles triangle has an angle that measures 120°. What measures are possible for the other two angles? Choose all that apply. 1) 10 Degrees 2) 30 Degrees 3
help i need help and this is due soon
select the question mark choose the answer that best tells what the highlighted detail shows about the mother​
Hormones released from the posterior pituitary are.
The ratio of cups of orange juice concentrate to water in a punch recipe is 1 : 6. If Stefan used 18 cups of water, how many cups of orange juice concentrate di
What is the last step in constructing an angle? O Make a mark at the number of degrees you want the angle to be. O Place the center of the protractor on the end
What was the social significance of cover songs in early rock music?
What was the first rap concept album chronicling the effects of crack-fueled violence in the inner city