All pastes #26820 Raw Edit

Unnamed

public cpp v1 · immutable
#26820 ·published 2005-10-27 12:05 UTC
rendered paste body
CIA H:const int mas = 100;const char *Duom = "Duom.txt";const char *Rez = "Rez.txt";//---------------------------------------------------------------------------class TForm1 : public TForm{__published:	// IDE-managed Components        TButton *Button1;        TMemo *Memo1;        TMemo *Memo2;        TButton *Button2;        void __fastcall Button1Click(TObject *Sender);        void __fastcall Button2Click(TObject *Sender);private:	// User declarations int  X[mas],      Y[mas],      x, y, a,b;      double      T[mas];      void Ivesti(const char fv[], int A[], int B[],int &n, int m);      void Skaiciuoti(double D[]);CIA CPP:void TForm1::Ivesti(const char fv[], int A[], int B[],int &n, int m){ ifstream fd(fv); n = 0; m = 0; while (!fd.eof()) {  fd>>X[n];  n++;  Memo1->Lines->Add(X[n]);  // cia tik patikrint  fd>>Y[m];  m++;  Memo2->Lines->Add(Y[m]);  //nu ir cia tas pats  }  if ( n > m ) n -= 1;  if ( m > n ) m -= 1;  }//-----------------------------------------------------void __fastcall TForm1::Button1Click(TObject *Sender){Ivesti(Duom, X, Y, a, b);}