cara membuat program zodiak menggunakan Delphi
1.jalan kan delphi
2.aturkan tampilan formsperti di bawah ini
3.klik 2x pada button 1(proses) dan koding dibawah ini. dan jalan kan.!!!!!!!!!!!!!
procedure bintang (var tgl,bln :integer);
var print :string;
begin
if (tgl>=21) and (tgl<=31) and (bln=1) or (tgl>=1) and (tgl<=19) and (bln=2) then
begin
showmessage('Aquarius');
end
else
if (tgl>=20) and (tgl<=29) and (bln=2) or (tgl>=1) and (tgl<=20) and (bln=3) then
begin
showmessage('Pisces');
end
else
if (tgl>=21) and (tgl<=30) and (bln=3) or (tgl>=1) and (tgl<=20) and (bln=4) then
begin
showmessage('Aries');
end
else
if (tgl>=21) and (tgl<=30) and (bln=4) or (tgl>=1) and (tgl<=21) and (bln=5) then
begin
showmessage('Taurus');
end
else
if (tgl>=22) and (tgl<=31) and (bln=5) or (tgl>=1) and (tgl<=21) and (bln=6) then
begin
showmessage('Gemini');
end
else
if (tgl>=22) and (tgl<=30) and (bln=6) or (tgl>=1) and (tgl<=22) and (bln=7) then
begin
showmessage('Cancer');
end
else
if (tgl>=23) and (tgl<=31) and (bln=7) or (tgl>=1) and (tgl<=22) and (bln=8) then
begin
showmessage('Leo');
end
else
if (tgl>=23) and (tgl<=31) and (bln=8) or (tgl>=1) and (tgl<=25) and (bln=9) then
begin
showmessage('Virgo');
end
else
if (tgl>=26) and (tgl<=30) and (bln=9) or (tgl>=1) and (tgl<=23) and (bln=10) then
begin
showmessage('Libra');
end
else
if (tgl>=24) and (tgl<=31) and (bln=10) or (tgl>=1) and (tgl<=22) and (bln=11) then
begin
showmessage('Scorpio');
end
else
if (tgl>=23) and (tgl<=30) and (bln=11) or (tgl>=1) and (tgl<=21) and (bln=12) then
begin
showmessage('Sagitarius');
end
else
if (tgl>=22) and (tgl<=31) and (bln=12) or (tgl>=1) and (tgl<=20) and (bln=1) then
begin
showmessage('Capricorn');
end
else
end;
procedure TForm1.Button1Click(Sender: TObject);
var TGL,BLN :integer;
begin
TGL := strtoint(edit1.Text );
BLN:= strtoint (edit2.Text );
bintang(TGL,BLN);
end;
end.