Source Code
unit Average;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Edit7: TEdit;
Edit8: TEdit;
Edit9: TEdit;
Edit10: TEdit;
Edit11: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
edit11.text := floattostrf(((strtofloat(edit1.text) +
strtofloat(edit2.text) + strtofloat(edit3.text) +
strtofloat(edit4.text) + strtofloat(edit5.text) +
strtofloat(edit6.text) + strtofloat(edit7.text) +
strtofloat(edit8.text) + strtofloat(edit9.text) +
strtofloat(edit10.text)) / 10), ffgeneral, 10, 4);
end;
end.
Click