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

A store had 88 diet sodas.The ratio of diet sodas to regular sodas was 8:4.How many regular sodas were there?
identify the beliefs of protestants and the beliefs of catholics
In North America, where is population density the highest?
Please help me correct this Spanish??
Please Help!!!! History will mark brainliest
During the adult years, ____ can adversely affect the immune system. undernutrition overnutrition excessive iron intake obesity all of these choices are correct
ead this excerpt from Chapter 1 of I Know Why the Caged Bird Sings by Maya Angelou and answer the question. When I was three and Bailey four, we had arrived in
WYDY do objects fall to the ground at the same time?
During translation a peptide bond forms between the R group of a. the first amino acid and the carboxyl group of the second amino acid. b. the central B-carbo
how ingestion of salt reduces th e amout of water in urine