Disini saya akan berbagi sedikit tentang coding membuat Belah Ketupat di Pascal Tapi jika teman-teman semua tidak punya aplikasinya bisa download Disini
Langsung aja ni gan ke Script Membuat Belah Ketupat di Pascal :
Program Belah_Ketupat;
uses wincrt;
var
N,i,j,k : integer;
begin
writeln;
write ('Masukkan Batas : ');readln(N);
writeln;
for i := 1 to N do
begin
for k := (N-1) downto i do
begin
write (' ');
end;//For
for j:= 1 to i do
begin
write(j,' ');
end;//For
for j:=(i-1) downto 1 do
begin
write(j,' ');
end;
writeln(' ');
end;// End For Awal 1
for i := (N-1) downto 1 do
begin
for k := (N-1) downto i do
begin
write (' ');
end; // For
for j := i downto 1 do
begin
write (j,' ');
end;// For
for j := 1 to (i-1) do
begin
write(j,' ');
end;
writeln(' ');
end;// For Awal 2
readln;
end.
uses wincrt;
var
N,i,j,k : integer;
begin
writeln;
write ('Masukkan Batas : ');readln(N);
writeln;
for i := 1 to N do
begin
for k := (N-1) downto i do
begin
write (' ');
end;//For
for j:= 1 to i do
begin
write(j,' ');
end;//For
for j:=(i-1) downto 1 do
begin
write(j,' ');
end;
writeln(' ');
end;// End For Awal 1
for i := (N-1) downto 1 do
begin
for k := (N-1) downto i do
begin
write (' ');
end; // For
for j := i downto 1 do
begin
write (j,' ');
end;// For
for j := 1 to (i-1) do
begin
write(j,' ');
end;
writeln(' ');
end;// For Awal 2
readln;
end.
Ini Hasilnya gan.. :
Silahkan Di Coba Gan.. :)
Mudah bukan membuat belah ketupat di pascal.. haha
3 comments
Write commentsgan...klo diubah jd tanda bintang semua bkn angka gmna(*)?
ReplyKalo pake perulangan while do gimana min? :'(
ReplyGood game
ReplySilahkan Jika Ada yang Ditanyakan ? EmoticonEmoticon