AntoSVK

maximum bez pomocnej max

Feb 18th, 2013
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 1.28 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 then
  42.     begin
  43.       if a>c then
  44.               begin
  45.               label4.caption:=inttostr(a);
  46.               end else
  47.                 begin
  48.                   label4.caption:=inttostr(c);
  49.                    end;
  50.               end else
  51.  
  52.               begin
  53.               if b>c then
  54.                   begin
  55.                   label4.caption:=inttostr(b) end
  56.                   else
  57.                    begin
  58.                    label4.caption:=inttostr(c);
  59.                   end;
  60.              end;
  61.     end;
  62.  
  63. end.
Advertisement
Add Comment
Please, Sign In to add comment