unit unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; type TForm1 = class(TForm) Label8: TLabel; Label10: TLabel; RadioGroup1: TRadioGroup; RadioGroup2: TRadioGroup; Edit4: TEdit; Edit5: TEdit; Edit6: TEdit; Label1: TLabel; Edit1: TEdit; Edit2: TEdit; Edit3: TEdit; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label13: TLabel; Label14: TLabel; Edit7: TEdit; Edit8: TEdit; Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin case radiogroup2.ItemIndex of 0: case radiogroup1.ItemIndex of 0: edit8.text:= floattostrf(strtofloat(edit1.text)*strtofloat(edit7.Text),fffixed,10,2); 1: edit8.text:= floattostrf(strtofloat(edit2.text)*strtofloat(edit7.Text),fffixed,10,2); 2: edit8.text:= floattostrf(strtofloat(edit3.text)*strtofloat(edit7.Text),fffixed,10,2); end; 1: case radiogroup1.ItemIndex of 0: edit8.text:= floattostrf(strtofloat(edit4.text)*strtofloat(edit7.Text),fffixed,10,2); 1: edit8.text:= floattostrf(strtofloat(edit5.text)*strtofloat(edit7.Text),fffixed,10,2); 2: edit8.text:= floattostrf(strtofloat(edit6.text)*strtofloat(edit7.Text),fffixed,10,2); end; end; end; procedure TForm1.Button2Click(Sender: TObject); begin radiogroup1.ItemIndex:=-1; radiogroup2.ItemIndex:=-1; edit7.text:='0'; edit8.text:='0'; end; end.
1/--страниц