Get Gifs at CodemySpace.com


------------------------------------------------------


Get Gifs at CodemySpace.com



---------------------------------------------------------
<html> <title>Membuat program kalkulator sederhana menggunakan textbox 

Kamis, 06 Oktober 2011

membuat piramit bintang,, Agus

program bintang_piramid; uses wincrt; var c,a,b,n : integer; begin write ('masukkan angka : ');readln(n); writeln; if n mod 2 = 0 then for a := 1 to (n div 2) do begin for b := 1 to (n div 2)-a do write (' '); for c := 1 to (a*2) do write ('*'); writeln; end else for a := 1 to (n div 2)+1 do begin for b := 1 to (n div 2)+(1-a) do write (' '); for c := 1 to (a*2)-1 do write ('*'); writeln; end; end.

Tidak ada komentar:

Poskan Komentar