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

how can i use troubleshooting in a sentence
How do you use the word surprisingly in a sentence and the the word unfortunately in a different sentence?
Is there more than one universe that can be explained?
what is 240,000 written as a whole number multiplied by a power of 10?
Sarafina had 34 out of 99 hits at bat during the softball season.what is her batting average. How do i get results without a calculator
Four more than twice a number is 8
Jenny charges $9.15 an hour to babysit toddlers and $7.45 an hour to babysit school-aged children, If jenny babysat toddlers for 9 hours and school-aged childre
How to turn 58,927 into scientific notation
What is 1/50 in decimal form?
What is r=wp solving for p