Advertisement
Guest User

Untitled

a guest
Oct 17th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.90 KB | None | 0 0
  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  7.   Dialogs, StdCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Edit1: TEdit;
  12.     Edit2: TEdit;
  13.     Edit3: TEdit;
  14.     Button1: TButton;
  15.     Label1: TLabel;
  16.     procedure Button1Click(Sender: TObject);
  17.   private
  18.     { Private declarations }
  19.   public
  20.     { Public declarations }
  21.   end;
  22.  
  23. var
  24.   Form1: TForm1;
  25.  
  26. implementation
  27.  
  28. {$R *.dfm}
  29.  
  30. procedure TForm1.Button1Click(Sender: TObject);
  31. var
  32. num1,num2,num3,  max:integer;
  33. begin
  34.  num1 := strtoint(Edit1.Text);
  35.  num2 := strtoint(Edit2.Text);
  36.  num3 := strtoint(Edit3.Text);
  37. if ( num1 > num2 ) then  max := num1
  38.    else max := num2 ;
  39.  
  40.    if ( max < num3 )then max := num3;
  41.    //  òàêèì  îáðàçîì  ñðàâíèëè âñå  òðè, òåïåðü íàèáîëüøåå â  max
  42.    Form1.Label1.Caption:=inttostr(max);
  43. end;
  44.  
  45. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement