unit el nº menor;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
procedure Button3Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button3Click(Sender: TObject);
begin
CLOSE
end;
procedure TForm1.Button1Click(Sender: TObject);
VAR
a,b,c,d,e,min:real;
begin
try
a:= StrTofloat(Edit1.text);
b:= StrTofloat(Edit2.text);
c:= StrTofloat(Edit3.text);
d:= StrTofloat(Edit4.text);
e:= StrTofloat(Edit5.text);
min:= a;
If b < min then
min:= b;
If c < min then
min:= c;
If d < min then
min:= d;
If e < min then
min:= e;
Edit6.Text:=Floattostr(min);
except
on
EconvertError do ShowMessage(#9' ERROR EN LOS DATOS INGRESADOS ');
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
Edit3.Clear;
Edit4.Clear;
Edit5.Clear;
Edit6.Clear;
Edit1.SetFocus;
end;
end
jueves, 23 de abril de 2009
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario