Masjito Blog

Tukang Jualan Aplikasi / Software LKM (BPR, BMT, KSP, LKM, Lab Banking, Dll)

Kode Pascal Menampilkan Bilangan Genap


Berikut ini adalah contoh pengulangan while .. do dalam bahasa pascal.

Program Pengulangan;

{program pengulangan menggunakan (while – do)
tampilkan Bilangan GENAP
kerjakan aksi SELAMA kondisi terpenuhi yaitu i<50
proses akan berhenti ketika nilai akhir i=49
}            

uses wincrt; {ganti dengan uses crt; jika menggunakan compiler free pascal}

var
     i : integer;
 
Begin                               
     clrscr;
     i := 0;
     while ( i<50 )
     do
       begin
         i := i+2;
         write(‘ ‘,i);  
       end;
       readln;
end.

About these ads

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Information

This entry was posted on 19/11/2007 by in Algoritma Pascal.

My Tweet

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: