unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, StdCtrls;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Edit1: TEdit;
    Label2: TLabel;
    Edit2: TEdit;
    UpDown1: TUpDown;
    Label3: TLabel;
    Edit3: TEdit;
    Label4: TLabel;
    Label5: TLabel;
    Edit4: TEdit;
    Edit5: TEdit;
    Label6: TLabel;
    Button1: TButton;
    Label7: TLabel;
    UpDown2: TUpDown;
    UpDown3: TUpDown;
    UpDown4: TUpDown;
    Label8: TLabel;
    Label9: TLabel;
    Edit6: TEdit;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    Label15: TLabel;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var rychlost,o,rs,pastorek,rozeta,otacky,primar,zaokrouhleni : real;

begin
rs := strtofloat(Edit2.Text);
if rs = 1 then
begin
rychlost:= strtofloat(Edit1.Text);
o:= strtofloat(Edit3.Text);
pastorek:= strtofloat(Edit4.Text);
rozeta:= strtofloat(Edit5.Text);
primar:= strtofloat(Edit6.Text);
otacky:= (rychlost/3.6) / o * (rozeta/pastorek) * 2.6989 * primar * 60;
zaokrouhleni:= Round(otacky*10)/10;
Label7.Caption := floattostr(zaokrouhleni);
end;
if rs = 2 then
begin
rychlost:= strtofloat(Edit1.Text);
o:= strtofloat(Edit3.Text);
pastorek:= strtofloat(Edit4.Text);
rozeta:= strtofloat(Edit5.Text);
primar:= strtofloat(Edit6.Text);
otacky:= (rychlost/3.6) / o * (rozeta/pastorek) * 1.478571 * primar * 60;
zaokrouhleni:= Round(otacky*10)/10;
Label7.Caption := floattostr(zaokrouhleni);
end;
if rs = 3 then
begin
rychlost:= strtofloat(Edit1.Text);
o:= strtofloat(Edit3.Text);
pastorek:= strtofloat(Edit4.Text);
rozeta:= strtofloat(Edit5.Text);
primar:= strtofloat(Edit6.Text);
otacky:= (rychlost/3.6) / o * (rozeta/pastorek) * 1 * primar * 60;
zaokrouhleni:= Round(otacky*10)/10;
Label7.Caption := floattostr(zaokrouhleni);
end;

end;

end.
