C has 3 types of loops.
do
{
foo += increment;
}
while(foo != bar);
This loop will continue until foo equals bar but will execute the loop at least once, even if foo equals bar. The variable increment may be changed within the do loop. It is imperative that the value foo can reach equality with bar, otherwise an endless (run for ever) loop condition exists.
*****
while(foo != bar)
{
foo += increment;
}
The loop will continue until foo equals bar but will not execute if foo equals bar.
The variable increment may be changed within the do loop. It is imperative that the value foo can reach equality with bar, otherwise an endless (run for ever) loop condition exists.
*****
for (foo = 0; foo < bar; foo+= increment)
{
}
The loop will continue until foo equals bar. The stepping amount is controlled by the value of increment. The value of increment could be changed inside the loop.
it is when a control loop is open and processing
decremented
The sensitivity of an open loop control system is always 1, it is due to no feedback involved in open loop.
A: By definition there is no control on a system in an open loop situation. simply . it has no feedback
A cruise control is an example of a closed loop servo.
Counting Loop
An infinite loop.
increment the loop control variable
The control structures used in java script are if-statement, for-loop, for-in loop, while loop,do-while loop, switch-statement, with-statement. try-catch-finally statements.
Executing a segment of a program repeatedly by introducing a counter and later testing it using the if statement.A sequence of statements are executed until some conditions for termination of the loop are satisfied.A Program loop consists of two segments:1.Body of the loop2. Control StatementDepending on the position of the control statement in the loop, a control strcture may be classifies either as the 2:Entry Controlled LoopExit Controlled Loop1.Entry Control Loop-(Pre Test Loop)The control conditions are tested before the start of the loop execution.If the conditions are not satisfied , then the body of the loop will not be executed.]eg:While Loop2.Exit Control Loop-(Post Test loop)The Test is performed at the end of the body of the loop and there fore the body is executed unconditionally for the first time.eg:Do-Whilewhile loopfor loopdo-while loop
no difference that's the difference
A Closed loop system basically will have a feedback which enables the rectification of the error in the main process,whereas it is not possible in an open loop system