buddha00441166 buddha00441166
  • 18-11-2020
  • Computers and Technology
contestada

Demonstrate the condition of a while loop that runs no more than five times using the variable x, which is initialized at x = 1.

Respuesta :

drasenick
drasenick drasenick
  • 18-11-2020

Answer:

Python Code:

x = 1

while x <= 5:

# do something

x += 1 # then incriment

Java Code:

int x = 1;

do {

System.out.println(i);

x++;

}

while (x <= 5);

Answer Link

Otras preguntas

jack wants to know how much water a spherical ball can hold with a radius of 8 cm?
What does 2 + 2 = ?
f(x) = 16x2 + 32x - 9?​
How do u do 8,10,12,14,16 ?plz help!!!
I need help writing a Spanish assignment!! Your important points and resources are clear and effective, and you have included the following: a narration explain
A fire truck parks 16 feet away from a building. The fire truck extends its ladder 30 feet to the very top of the building. How tall is the building? will give
Cuanto es 13-6+21×(8-4) En jerarquia de operaciones
oel purchased 100 shares of stock for ​$31 per share. During the​ year, he received dividend checks amounting to ​$202. Joel recently sold the stock for ​$58 pe
Tres autos parten de un mismo punto con un intervalo de 1s, con velocidades "3V", "5V" y "Vx", respectivamente hacia un punto "p", llegando a dicho punto al mis
What political position did the U.S. take at the start of World War I?