Author Question: What will the following code display?int x = 0;while (x < 5){ cout (Read 65 times)

Beheh

  • Hero Member
  • *****
  • Posts: 520
What will the following code display?
int x = 0;
while (x < 5)
{
    cout << x << " ";
    x++;
}

0 1 2 3 4
0 1 2 3 4 5
0
1
2
3
4

◦ This is an infinite loop


nanny

  • Sr. Member
  • ****
  • Posts: 313

Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
 

Did you know?

Although puberty usually occurs in the early teenage years, the world's youngest parents were two Chinese children who had their first baby when they were 8 and 9 years of age.

Did you know?

The tallest man ever known was Robert Wadlow, an American, who reached the height of 8 feet 11 inches. He died at age 26 years from an infection caused by the immense weight of his body (491 pounds) and the stress on his leg bones and muscles.

Did you know?

About 600,000 particles of skin are shed every hour by each human. If you live to age 70 years, you have shed 105 pounds of dead skin.

Did you know?

About 100 new prescription or over-the-counter drugs come into the U.S. market every year.

Did you know?

The ratio of hydrogen atoms to oxygen in water (H2O) is 2:1.

For a complete list of videos, visit our video library