unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Panel1: TPanel;
GroupBox1: TGroupBox;
Edit1: TEdit;
Edit2: TEdit;
Memo1: TMemo;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var a,b:integer;
begin
a:=StrToInt(Edit1.Text);
b:=StrToInt(Edit2.Text);
if (a>0) and (b>0) then Memo1.Lines.Add('KUADRAN I');
if (a<0) and (b>0) then Memo1.Lines.Add('KUADRAN II') ;
if (a<0) and (b<0) then Memo1.Lines.Add('KUADRAN III') ;
if (a>0) and (b<0) then Memo1.Lines.Add('KUADRAN IV') ;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Edit1.Clear;Edit2.Clear;
Memo1.Clear;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
ShowMessage('apakan anda benar-benar ingin keluar');
Application.Terminate;
end;
end.
PROGRAM KUADRAN
Jumat, 16 Maret 2012
Diposting oleh
Allieef Mukti Chie Bonchell
di
18.10
Label: Contoh Program Delphi
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar