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

5.818, 5 9/25, 53/10, 5.81 from least to greatest. THanKs :)
what's is the answer ​
A triangular logo on the back of a T-shirt has a base of 51/2 inches and a height of 4 inches. What is the area of the logo?
. En vez de ayudar a las otras abejas a recoger jugo de las flores, la abeja ____. pasa todo el día con su amiga, la serpiente disfruta del día volando y tomand
describe two reasons the government supported scrap drives during wwii​
the pressure in a car tire is 1.88 atm at 25 celsius. what will be the pressure if the temperature increases to 310K?
the opposite of conflict is not a monotous consensus, rather it is a​
Simplify the expression (use distributive property) 4+2(3x-1)+9 A) 6x+15 B) 6x+11 C) 5x+14 D) 3x+14
Which type of nuclear reaction is used in commercial power generation? A. Fusion B.fission C.alpha decay
G is the centroid of triangle ABC. what is the value of x? What is the length of the segment DG,AG, AND AD?