interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Edit7: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
arv
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
a,b,c,d,e,f,s:real;
s1,s2,s3,s4:real;
procedure Sq(x,y,z:real; var s:real);
var p:real;
begin
p:=(x+y+z)/2;
s:=sqrt(p*(p-x)*(p-y)*(p-z));
end;
begin
a:=strtofloat(edit1.Text);
b:=strtofloat(edit2.Text);
c:=strtofloat(edit3.Text);
d:=strtofloat(edit4.Text);
e:=strtofloat(edit5.Text);
f:=strtofloat(edit6.Text);
Sq(a,b,c,s1); Sq(c,d,e,s2); Sq(b,e,f,s3); Sq(a,f,d,s4);
s:=s1+s2+s3+s4;
edit7.Text:='s='+floattostr(s);
end; end.
3.6.4-suwret. Maydandi esaplaw programmasi
6-masele. Shen'berdin' shepden ong'a hareketini korsetetug'in programma duzin'.
1. Standart komponentalar palitrasinin' Data Access biyikligi tuymeshesi saylanadi ha'm forma ustinde payda boladi.. Natiyjede Timer1 tuymeshesi payda boladi.
Do'stlaringiz bilan baham: |