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);
dummies
Source:http://www.dummies.com/how-to/content/computer-programming-looping-statements.html
No comments:
Post a Comment