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

Prior to 1497 how we’re good transported from India and China to Europe
What were some issues on which hamilton and jefferson disagreed? 1 point?
List the three items of information included in an encounter form superbill
Cristina y Brady son muy cómicos, pero Cristina es ________(funnier than-3 palabras) Brady.
East Germany, Hungary ,Romania, Poland , Soviet Union ,Which alliance would the countries listed above mostly likely fall into?
Mrs. Morton has a special reward system for her class. When all her students behave well, she rewards them b putting 3 marbles into a marble jar. When the jar h
Which of the following statements best describes the purpose of the Virginia Company, chartered by King James I in 1606? A. The British wanted to establish s
In a paragraph, explain why Jane declines St. John’s offer to travel with him to India? What about this possibility is appealing to Jane? Your answer should be
Why did Adam's commissioning of William Marbury never officially effective?
Please help me with this plot x and y intercepts y=1/3x-1=?