Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit1;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls;
- type
- TForm1 = class(TForm)
- Edit1: TEdit;
- Edit2: TEdit;
- Edit3: TEdit;
- Button1: TButton;
- Label1: TLabel;
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- procedure TForm1.Button1Click(Sender: TObject);
- var
- num1,num2,num3, max:integer;
- begin
- num1 := strtoint(Edit1.Text);
- num2 := strtoint(Edit2.Text);
- num3 := strtoint(Edit3.Text);
- if ( num1 > num2 ) then max := num1
- else max := num2 ;
- if ( max < num3 )then max := num3;
- // òàêèì îáðàçîì ñðàâíèëè âñå òðè, òåïåðü íàèáîëüøåå â max
- Form1.Label1.Caption:=inttostr(max);
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement