AntoSVK

max s neuplnym vetvenim s pom. max

Feb 18th, 2013
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.83 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.     Label1: TLabel;
  15.     Label2: TLabel;
  16.     Label3: TLabel;
  17.     Button1: TButton;
  18.     Label4: TLabel;
  19.     procedure Button1Click(Sender: TObject);
  20.   private
  21.     { Private declarations }
  22.   public
  23.     { Public declarations }
  24.   end;
  25.  
  26. var
  27.   Form1: TForm1;
  28.  
  29. implementation
  30.  
  31. {$R *.dfm}
  32.  
  33. procedure TForm1.Button1Click(Sender: TObject);
  34. var
  35. a,b,c,max:integer;
  36. begin
  37. a:=StrToInt(Edit1.Text);
  38. b:=StrToInt(Edit2.Text);
  39. c:=StrToInt(Edit3.Text);
  40. max:=a;
  41.  
  42. if b>max then
  43.     max:=b;
  44. if c>max then
  45.     max:=c;
  46. label4.caption:=inttostr(max);
  47. end;
  48.  
  49. end.
Advertisement
Add Comment
Please, Sign In to add comment