Computer Programming Looping Statements

Part of the Beginning Programming All-In-One For Dummies Cheat Sheet

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

for (initial variable value, final value, increment) { commands; }
while (condition) { commands; }
do { commands; } while (condition);
  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus

SERIES
Beginning Programming All-In-One For Dummies Cheat Sheet

Advertisement

Inside Dummies.com

Dummies.com Sweepstakes

Win $500. Easy.