SHOPPING CART

close

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

loading...
loading...

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.

Jangan lupa like kami di Facebook untuk stay update informasi terbaru:

Yang mau ntraktir saya ngopi, silahkan berdonasi. Klik banner di bawah ini untuk melihat rekening donasi.
DONASI DI SINI

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

Tags:

26 thoughts on “Pascal :: Contoh-Contoh Penggunaan Perulangan For..Do..

  • noval rizqillah

    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

      Paling sederhana ya gini :

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

  • huse

    kl hasilnya gini:

    1
    212
    32123
    4321234

    bgaimana rumusnya????

  • huse

    yg diatas td bentuknya segitiga sama kaki

  • andre

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

  • ryo

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

  • ricky kristian

    tolong ajarin program utk buat

    jika di inputkan N=5

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

    dan program jika diinputkan 5

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

    please….

  • Rahmat Hidayat

    Thanks ya iLmunya!

  • Beny Prasetio

    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

  • nadia indah sari

    kalo
    6
    56
    456
    3456
    23456
    123456
    gmn

  • Jamal

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

  • MGHerring Group

    … [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 […]

  • wazeeft.com

    … [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 […]

  • DMPK

    … [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 […]

  • choker necklace

    … [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 […]

  • wiet

    … [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 […]

  • Situs Judi Bola

    … [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 […]

  • judi online

    … [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 […]

  • get italian citizenship

    … [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 […]

  • bra att läsa

    … [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 […]

  • Aws Alkhazraji the best Engineer X

    … [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 […]

  • engineering uodiyala

    … [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 […]

  • cara membuat aplikasi android

    … [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 […]

  • ATV Tours Las Vegas

    … [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 […]

  • goedkoopste persoonlijke lening

    … [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 […]

  • avvocato

    … [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

error: Maaf, dilarang copy-paste!
%d bloggers like this: