Skip to main content

Posts

Showing posts from September 7, 2008

loops2

The versatility of the computer lies in its ability to perform a set of instructions repeatedly. This involves repeating some portion of the program either a specified number of times or until a particular condition is being satisfied. This repetitive operation is done through a loop control instruction. There are three methods by way of which we can repeat a part of a program; (1) Using a for statement (2) Using a while statement (3) Using a do-while statement

Loops

Till now we have studied the use of Decision or Sequential Control statements. When executed thesestatements always perform the same series of actions, in the same way, exactly once.But in order to perform programs that can do an action over and over,we need LOOPS. Thus in the next post we are going to discuss about the Loops.