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

Find the number which when increased by 12% becomes 336
is it correct my answer Function: SUM; Cell Referencing Some cells are merged. Using Excel to Prepare the Shareholders' Equi
HELP AND SHOW WORK ON HOW YOU GOT THE ANSWER
connected world remains to be seen. Question In context, which of the following best replaces "This" in sentence 10 (reproduced below)? This helped sustain Guar
According to the Global Times, the missile base built by the Japanese Self-Defense Force on Ishigaki Island has been basically completed and will officially beg
b) Decrease R1500 in the ratio of 2:5 ​
QUADRATIC FORMULA WORD PROBLEMS i need questions 3,4,5 and 6
The graph shows the variation in birth weights in a specific population of humans. How can the variation of birth weights in this population be described? Res
Document specialist a specialization of medical transcription it’s convert electronic medical records Into medical documents?
Anyone please help me solve both questions please or any pls