unit U_inicial;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    RadioGroup1: TRadioGroup;
    CheckBox1: TCheckBox;
    Button1: TButton;
    Memo1: TMemo;
    Label4: TLabel;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  media: real;
begin
  case RadioGroup1.ItemIndex of
    //aritmetica
    0: media:= (strtofloat(Edit1.Text) + StrToFloat(edit2.Text) + StrToFloat(Edit3.Text)) / 3;
    //ponderada
    1: media:= (StrToFloat(Edit1.text) * 3 + StrToFloat(Edit2.Text) *3 + StrToFloat(Edit3.Text)*4) / 10 ;

    2: media:= 3 / (1 / StrToFloat(Edit1.Text) + 1 / StrToFloat(Edit2.Text) + 1 / StrToFloat(Edit3.Text));
  end;
end;

  if CheckBox1.Checked then begin
    memo1


end.
