Home

Computer Programming Looping Statements

|
Updated:  
2016-03-26 20:25:03
|
HTML & CSS Essentials For Dummies
Explore Book
Buy On Amazon

Programs can automatically repeat subroutines and subprograms based on these looping statements. They can repeat a number of times, count a set of items and repeat for each item, or repeat as long as an attribute is true or false.

For variable = startvalue to endvalue
  Commands
Next
<br />for (initial variable value, final value, increment) {
  commands;
}
<br />while (condition) {
  commands;
}
<br />do {
  commands;
} while (condition);

About This Article

This article is from the book: 

About the book author:

Wallace Wang specializes in making complex topics understandable. His assorted For Dummies tech books have sold nearly half a million copies. He has a master’s degree in computer science along with side hustles in stand-up comedy and screenwriting because life is too short to focus on just one thing.