0% found this document useful (0 votes)
17 views2 pages

Pascal While Loop Examples

The document contains 4 programs that use a while loop to iterate from 0 to 10 and output the current value of variable i each time. The programs demonstrate initializing i to different starting values and changing the loop condition.

Uploaded by

Faiz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

Pascal While Loop Examples

The document contains 4 programs that use a while loop to iterate from 0 to 10 and output the current value of variable i each time. The programs demonstrate initializing i to different starting values and changing the loop condition.

Uploaded by

Faiz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

programwhile_do;

usescrt;
var
i:integer;
begin
clrscr;
i:=0;

whilei <10do
begin
writeln('Hello World');
i:= i +1;
end;
readln;
end.

programwhile_do;
usescrt;
var
i:integer;
begin
clrscr;
i:=0;

whilei <10do
begin
writeln('Variabel i sekarang bernilai: ',i);
i:= i +1;
end;
readln;
end.

programwhile_do;
usescrt;
var
i:integer;
begin
clrscr;
i:=5;

whilei <=10do
begin
writeln('Variabel i sekarang bernilai: ',i);
i:= i +1;
end;
readln;
end.

programwhile_do;
usescrt;
var
i:integer;
begin
clrscr;
i:=5;

whilei <11do
begin
writeln('Variabel i sekarang bernilai: ',i);
i:= i +1;
end;
readln;
end.

You might also like