loading...

Pascal :: Contoh-Contoh Penggunaan Perulangan For..Do..

Berikut ini adalah sebagian contoh perulangan dengan penerapan statemen For.. Do..


Uses Wincrt;
const
akhir = 4;
var
baris,kolom : integer;
begin
for baris := akhir downto 1 do
begin
for kolom := baris downto 1 do
write(kolom);
writeln;
end;
end.

Hasil :
4321
321
21
1


Uses Wincrt;
const
akhir = 4;
var
baris,kolom : integer;
begin
for baris := akhir downto 1 do
begin
for kolom := 1 to baris do
write(kolom);
writeln;
end;
end.

Hasil :
1234
123
12
1


Uses Wincrt;
const
akhir = 4;
var
baris,kolom : integer;
begin
for baris := 1 to akhir do
begin
for kolom := 1 to baris do
write(baris);
writeln;
end;
end.

Hasil :
1
22
333
4444


Uses Wincrt;
const
akhir = 4;
var
baris,kolom : integer;
begin
for baris := akhir downto 1 do
begin
for kolom := baris downto 1 do
write(baris);
writeln;
end;
end.

Hasil :
4444
333
22
1


Uses Wincrt;
const
akhir = 3;
var
baris,kolom : integer;
begin
for baris := akhir downto 1 do
begin
for kolom := baris downto 1 do
write(baris,' ',kolom);
writeln;
end;
end.

Hasil :
3 33 23 1
2 22 1
1 1


Uses wincrt;
var baris,kolom,jumbaris :integer;
begin
write ('Jumlah Baris : ');readln(jumbaris);
FOR BARIS:=1 TO jumbaris do
begin
write ('*': jumbaris baris);
FOR kolom := 2 TO (2 *baris -1 ) do
begin
write('*');
end;
writeln;
end;
end.

Hasil :
(baris = 4)
*
***
*****
*******

26 Responses to Pascal :: Contoh-Contoh Penggunaan Perulangan For..Do..

  1. noval rizqillah says:

    kk saya mau belajar dari dasar .

    minta huruf yg dasar’a dr A~Z & dr 0~9 ya .

    plisss .

    krmin k email aq ya .

    • admin says:

      Paling sederhana ya gini :

      program perulangan;
      Uses
      WinCRT;
      var
      i : integer;
      begin
      for i := 0 to 9 do
      writeln (i);
      end.

  2. huse says:

    kl hasilnya gini:

    1
    212
    32123
    4321234

    bgaimana rumusnya????

  3. huse says:

    yg diatas td bentuknya segitiga sama kaki

  4. andre says:

    mungkin gini :
    0
    1
    2
    3
    4
    5
    6
    7
    8
    9
    gimana boz..

  5. ryo says:

    klo bisa begini caranya gimna bos !
    masukan program pengulangan : ryosaputra
    r
    ry
    ryo
    ryos
    ryosa
    ryosap
    ryosapu
    ryosaput
    ryosaputr
    ryosaputra

  6. ricky kristian says:

    tolong ajarin program utk buat

    jika di inputkan N=5

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

    dan program jika diinputkan 5

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

    please….

  7. Thanks ya iLmunya!

  8. Beny Prasetio says:

    Untuk Segitiga Pascal ane ada rumusnya…..

    Liat hasil di
    https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/421936_345568708799995_100000406055368_1059150_2063392105_n.jpg

    Kalo Mau Hubungi E-mail ane
    E-mail : Benyprasetio@gmail.com

  9. nadia indah sari says:

    kalo
    6
    56
    456
    3456
    23456
    123456
    gmn

  10. Jamal says:

    contoh ke dua tdi tpi dengan perulangan repeat until gmn ya gan?? di email bisa ngk??

  11. … [Trackback]

    […] Find More here|Find More|Read More Informations here|There you will find 29256 additional Informations|Informations to that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

  12. wazeeft.com says:

    … [Trackback]

    […] Read More here|Read More|Read More Informations here|There you can find 23347 additional Informations|Informations to that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

  13. DMPK says:

    … [Trackback]

    […] Find More here|Find More|Read More Informations here|There you will find 47262 additional Informations|Infos to that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

  14. … [Trackback]

    […] Read More here|Read More|Find More Informations here|There you can find 34549 additional Informations|Infos to that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

  15. wiet says:

    … [Trackback]

    […] Find More here|Find More|Find More Informations here|Here you can find 1147 additional Informations|Infos to that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

  16. … [Trackback]

    […] Find More here|Find More|Read More Infos here|There you will find 74049 more Infos|Informations on that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

  17. judi online says:

    … [Trackback]

    […] Find More on|Find More|Read More Informations here|Here you can find 36177 more Informations|Informations to that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

  18. … [Trackback]

    […] Read More here|Read More|Read More Infos here|There you will find 83437 additional Infos|Infos on that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

  19. … [Trackback]

    […] Find More here|Find More|Read More Informations here|Here you can find 62054 more Informations|Infos on that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

  20. … [Trackback]

    […] Find More here|Find More|Read More Informations here|Here you will find 16009 additional Informations|Informations to that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

  21. … [Trackback]

    […] Find More on|Find More|Read More Informations here|There you can find 40834 additional Informations|Infos to that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

  22. … [Trackback]

    […] Read More on|Read More|Read More Informations here|Here you can find 77136 more Informations|Infos on that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

  23. … [Trackback]

    […] Find More here|Find More|Find More Informations here|There you can find 79981 more Informations|Informations on that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

  24. … [Trackback]

    […] Find More here|Find More|Find More Informations here|There you can find 24006 additional Informations|Infos to that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

  25. avvocato says:

    … [Trackback]

    […] Find More here|Find More|Read More Informations here|Here you will find 3699 additional Informations|Infos to that Topic: blog.loksado.com/pascal-contoh-contoh-penggunaan-perulangan-for-do […]

Mari berdiskusi dengan santun...