unit Roman_U;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;
type
TForm1 =
class(TForm)
Label1: TLabel;
Label2: TLabel;
Panel1: TPanel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Panel2: TPanel;
Label9: TLabel;
Edit7: TEdit;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
Const
n = 6;
var
Element:
array[1..6]
of real;
i: integer; Summe: real;
begin
Element[1]:= StrToFloat(Edit1.text);
Element[2]:= StrToFloat(Edit2.text);
Element[3]:= StrToFloat(Edit3.text);
Element[4]:= StrToFloat(Edit4.text);
Element[5]:= StrToFloat(Edit5.text);
Element[6]:= StrToFloat(Edit6.text);
Summe:= 0;
for i:= 1
to 6
do summe := summe + Element[i];
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Application.terminate;
end;
end.