C <-> Object Pascal | Loop with condition on the beginning

C

while

Description

while (condition) statement
Used keywords: while

Input

Note: Here usable statements:
break statement continue statement

Examples

C

Loop with condition on the beginning the possible of use:
i=0;
while (i<10) ++i;
x =0;
while (i<20)
{
 i= i+2;
 if (i==16)
 {
    continue;
 }
 x++; 
}
.
Object Pascal

while do

Description

while condition do statement;
Used keywords: do while

Input

Note: Here usable statements:
break statement continue statement

Examples

Object Pascal

Loop with condition on the beginning the possible of use:
i:=0;
while i<10 do inc(i);
x :=0;
while i<20 do
begin
 i:= i+2;
 if i=16 then
 begin
    continue
 end;
 inc(x); 
end;
Languages: en hu cz sk