Friday, October 5, 2007

How to work REPEAT �. UNTIL statement

How to work REPEAT �. UNTIL statement

To work REPEAT �. UNTIL statement

Step 1

Description:

The statements between repeat and until are executed in sequence until, at the end of a sequence, the Boolean expression is True.

Declaration:

repeat

statement;

statement;

...

statement

until expression

Example:

Repeat

y:=(x*x*x+7*x-1)/(x*x-(x+5)/3);

Writeln;

Write(x,'',y);

if y>=0 then Write(' Admit ');

Writeln;

x:=x+0.50

Until x >=4.00;

No comments: