Babyswag3266 Babyswag3266
  • 12-07-2019
  • Computers and Technology
contestada

A while loop is somewhat limited, because the counter can only be incremented by one each time through the loop.



True False

Respuesta :

ArianneHester ArianneHester
  • 19-07-2019

Answer:

False

Explanation:

In a while loop we can increment the counter by any number that we wish. It is not that the counter can only be incremented by one each time through the loop.

Below is an example of a while loop with counter incremented by 5 each time.

int count=0;    //initialize count to 0

while(count<50){    //continue the loop till count is lesser than 50

  cout<<count;   //display the value of count

  count = count + 5;    //increment counter by 5 each time

}

Answer Link

Otras preguntas

Scott has 1/3 of the computer games as Anish, and Anish has 1/2 as many games as Nick. Together they have 140 games. How many do they have each? Scott has......
Multiply.1. [tex](2x^3y^3)(5x^2y^8)[/tex]                           2. [tex]9b^3(8b^4)(-b)[/tex]3. 3y²(y²-2y+3)
How do you get a liquid to a gas?
how many legs do phytoplankton have
How do you get a liquid to a gas?
how many legs do phytoplankton have
What are some quotes for of mice and men for the character Curley?
What are the pH changes in the stomach before and after taking an antacid tablet?
what is? 3.44 rounded to 1 decimal place12.09 1 decimal place18.39 1 decimal place44.347 1 decimal place82.383 1 decimal place49.2532 1 decimal place
Which phrase indicates the interior flow of thought employed in high-modern literature? a) automatic writing b) confused daze c) total recall d) stream of c