perulangan sederhana deret aritmatika 1-2-3-4-5 diselesaikan dengan
1. for-to do
uses wincrt;var
i:integer;
begin
for i:=1 to 5 do
writeln(i);
end.
2. while do
uses wincrt;var
i:integer;
begin
i:=0;
while i<=4 do
begin
i:=i+1;
writeln(i);
end;
end.
0 komentar:
Posting Komentar