You are on page 1of 1

var

Form1: TForm1;
PK,PP,OK,OP,DK,DP : Real;
implementation
{$R *.dfm}
procedure TForm1.RadioButton1Click(Sender: TObject);
begin
PK:= (StrToFloat(Edit1.Text)*StrToFloat(Edit1.Text));
PP:= (StrToFloat(Edit2.Text)*StrToFloat(Edit3.Text));
Edit4.Text:= ' POVRSINU!';
Edit5.Text:= FloatToStr(PK);
Edit6.Text:= FloatToStr(PP);
end;
procedure TForm1.RadioButton2Click(Sender: TObject);
begin
OK:= StrToFloat(Edit1.Text)*4;
OP:= (StrToFloat(Edit2.Text)+StrToFloat(Edit3.Text))*2;
Edit4.Text:= ' OBIM!';
Edit5.Text:= FloatToStr(OK);
Edit6.Text:= FloatToStr(OP);
end;
procedure TForm1.RadioButton3Click(Sender: TObject);
begin
DK:= StrToFloat(Edit1.Text)*SQRT(2.0);
DP:= SQRT(SQR(StrToFloat(Edit2.Text))+ SQR(StrToFloat(Edit3.Text)));
Edit4.Text:= ' DIJAGONALU!';
Edit5.Text:= FloatToStr(DK);
Edit6.Text:= FloatToStr(DP);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
IF PK>PP then
begin
Label10.Visible:= True;
Label10.Caption:= ' kvadrata!';
Label10.font.Color:= clBlue;
end
else
begin
Label10.Visible:= True;
Label10.Caption:= ' pravougaonika!';
Label10.font.Color:= clRed;
end
end;
end.

You might also like