Friday, October 5, 2007

How to work with WHILE statement

How to work with WHILE statement

To work with WHILE statement

Step 1

Description:

The while statements like the IF statements, tests a condition.

Declaration:

WHILE Boolean expression DO

Statements 1;

Statements 2;

Example:

While x <=4.00 do

begin

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

end;

No comments: