When might you use a while loop instead of a for loop? You want to skip every odd element. You don't know exactly how many times you will be looping. You want to have a decreasing counter. You have a few different conditions that may cause the loop to stop.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter8: Arrays
Section: Chapter Questions
Problem 4MQ4
icon
Related questions
Question

question is in regards to c++

When might you use a while loop instead of a for loop?
0
You want to skip every odd element.
You don't know exactly how many times you will be looping.
You want to have a decreasing counter.
0
You have a few different conditions that may cause the loop to stop.
Transcribed Image Text:When might you use a while loop instead of a for loop? 0 You want to skip every odd element. You don't know exactly how many times you will be looping. You want to have a decreasing counter. 0 You have a few different conditions that may cause the loop to stop.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Basics of loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning