Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
- #include "Unit1.h"
- #include "math.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma resource "*.dfm"
- TForm1 *Form1;
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::FormCreate(TObject *Sender)
- {
- Edit1->Text="182,5";
- Edit2->Text="18,225";
- Edit3->Text="-0,03298";
- Memo1->Clear();
- Memo1->Lines->Add("942791 Belko ");
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Button1Click(TObject *Sender)
- {
- double x,y,z;
- x=StrToFloat(Edit1->Text);
- Memo1->Lines->Add("x="+Edit1->Text);
- y=StrToFloat(Edit2->Text);
- Memo1->Lines->Add("y="+Edit2->Text);
- z=StrToFloat(Edit3->Text);
- Memo1->Lines->Add("z="+Edit3->Text);
- double a=fabs(pow(x,y/x)-pow(y/x,1./3.))+(y-x)*(cos(y)-z/(y-x))/(1+pow(y-x,2));
- Memo1->Lines->Add("P = " + FloatToStrF(a,ffFixed,8,4));
- }
- //---------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement