Advertisement
AntoSVK

maximum so zloženou podmienkou

Feb 18th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 1.14 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:integer;
  36. begin
  37. a:=StrToInt(Edit1.Text);
  38. b:=StrToInt(Edit2.Text);
  39. c:=StrToInt(Edit3.Text);
  40.  
  41. if (a>b) And (a>c) then
  42.     begin
  43.       label4.caption:=inttostr(a);
  44.     end else
  45.             begin
  46.               if (b>a) And (b>c) then
  47.                     begin
  48.                       label4.caption:=inttostr(b);
  49.                     end else
  50.                             begin
  51.                               label4.caption:=inttostr(c);
  52.                             end;
  53.     end;
  54.  
  55. end;
  56.  
  57. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement