⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 majform.pas

📁 随着我国经济的快速发展
💻 PAS
字号:
unit majform;

interface

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

type
  Tmajor = class(TForm)
    wnbtn: TButton;
    Lable1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    jh: TEdit;
    ycsd: TEdit;
    ygnj: TEdit;
    tgzj: TEdit;
    dwtd: TEdit;
    jdwd: TEdit;
    dcyl: TEdit;
    bhyl: TEdit;
    crxs: TEdit;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    Label15: TLabel;
    Label16: TLabel;
    Label17: TLabel;
    sycyl: TEdit;
    syly: TEdit;
    tjhsl: TEdit;
    yymd: TEdit;
    dcsmd: TEdit;
    sjcmd: TEdit;
    yybr: TEdit;
    dcsbr: TEdit;
    Button1: TButton;
    Button2: TButton;
    Label1: TLabel;
    Label19: TLabel;
    Label20: TLabel;
    J0: TEdit;
    Label21: TLabel;
    Qb: TEdit;
    Qc: TEdit;
    Pwf: TEdit;
    Label22: TLabel;
    Qo: TEdit;
    Label18: TLabel;
    Ps: TEdit;
    Label23: TLabel;
    Hp: TEdit;
    Label24: TLabel;
    lp: TEdit;
    Label25: TLabel;
    Label26: TLabel;
    Button3: TButton;
    procedure wnbtnClick(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
const
  M=10;N=5;
  g=9.8;

var
  major: Tmajor;
  a,b,c,middle:real;


implementation
uses wnform,cybform;

{$R *.dfm}

procedure Tmajor.wnbtnClick(Sender: TObject);
begin
  wndata.show;

end;

procedure Tmajor.Button1Click(Sender: TObject);
begin
  cybcircumstance.Show;
end;

procedure Tmajor.Button2Click(Sender: TObject);
var
  midu,yali:single;
  height:single;
begin
   if strtofloat(syly.Text)>strtofloat(bhyl.Text) then
     begin
       middle:=strtofloat(dcyl.Text)-strtofloat(syly.Text);
       j0.Text:=floattostr(strtofloat(sycyl.Text)/middle);
     end
   else
     begin
       middle:=strtofloat(dcyl.Text)-strtofloat(bhyl.Text)+
           strtofloat(bhyl.Text)*(1-0.2*strtofloat(syly.Text)/strtofloat(bhyl.Text)-
           0.8*sqr(strtofloat(syly.Text)/strtofloat(bhyl.Text)))/1.8;
           j0.Text:=floattostr(round(strtofloat(sycyl.Text)*1000/middle)/1000);
     end;
   qb.Text:=floattostr(round(strtofloat(j0.Text)*(strtofloat(dcyl.Text)-strtofloat(bhyl.Text))*1000)/1000);
   qc.text:=floattostr(round(strtofloat(j0.Text)*strtofloat(bhyl.Text)*1000/1.8)/1000);
   a:=0.8/sqr(strtofloat(bhyl.Text));
   b:=0.2/strtofloat(bhyl.Text);
   c:=(strtofloat(qo.Text)-strtofloat(qb.Text))/strtofloat(qc.Text)-1;
   pwf.Text:=floattostr(round((-b+sqrt(sqr(b)-4*a*c))/(2*a)*1000)/1000);
   midu:=strtofloat(tjhsl.Text)*strtofloat(yymd.Text)+
          (1-strtofloat(tjhsl.Text))*strtofloat(dcsmd.Text);
   yali:=round( midu*g*strtofloat(sjcmd.Text));
   ps.Text:= floattostr(round(yali*(1e-6)*1000)/1000)+'Mpa';
   height:= (strtofloat(pwf.Text)-yali*(1e-6))*(1e+6)/(g*midu);
   hp.Text:= floattostr(round(height*1000)/1000);
   lp.Text:=floattostr(round((strtofloat(ycsd.Text)-height)*1000)/1000);
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -