LOGO

Minggu, 18 Desember 2011

Program PASCAL

Alhamdulillah,,, akhirnya final juga tugas UAS PIK ^__-

Assalamu'alaikum,, Friends... ^__^

WELCOME..wajib baca ya...

PROGRAM CETAK BINTANG

Program_pola_bintang_turun;
uses wincrt;
var
i,n,j:integer;
begin readln (n);
for i:=1 to n do
begin for j:=1 to n do
begin if (j,i)
then write (' ')
else write ('*');
end;
writeln;
end;
end.

program pola_bintang_angka;
uses wincrt;
var i,j,n:integer;
a:string;
begin
write ('buat pola hingga baris ke-'); readln(n);
writeln;
for i:=1 to n do
begin
for j:=1 to i do
begin
if (j mod 2)=1 then
a:='*' else a:='1';
write (a,' ');
end;
writeln;
end; end.

program_cetak_bintang;
uses wincrt;
var
i,j:integer;
begin
for i:=1 to n do
begin
for j:=1 to i do
write ('*');
end;
end.

d:=d*10;
biner:=biner+sisa*d;
until desimal=0;
write('biner=',biner);
end.

0 komentar:

Posting Komentar