This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

For ... DO

Pengulangan For

for adalah fungsi yang digunakan untuk melakukan pengulangan berdasarkan series added values ( nilai yang bertambah secara otomatis )
bentuk : FOR [variable] = n TO n2 DO [statment]

program membuat_piramid_satu_sisi
uses crt;
var ptr,kls,bola: integer;

begin
clrscr;
for ptr:=1 to 10 do
begin

for kls:=1 to ptr do write('*');
writeln('');
end;
readln();
end.




hasil output


*
**
***
****
*****
******
*******
********
*********
**********


program segitiga_sisi_kanan
uses crt;
var ptr,kls,bola: integer;

begin
clrscr;

bola:=1;
for ptr:=1 to 20 do
begin

if prt<=10 then bola:=ptr else bola:= 20 - ptr;


for kls:=1 to bola do write('*');
writeln('');
end;

readln();
end.




hasil output


*
**
***
****
*****
******
*******
********
*********
**********
*********
********
*******
******
*****
****
***
**
*
Share:

Support