#include <vcl.h> #pragma hdrstop #include <math.h> #include "Unit1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm1::Button1Click(TObject *Sender) { double large,width,height,f; int arrayax1[3],arrayax2[3],arrayax3[3],data47[10]; large=StrToInt(Edit1->Text); width=StrToInt(Edit2->Text); height=StrToInt(Edit3->Text); // These stores the values of f in the respective array //When i write large=2 width=3 height=4, i get the values i already posted before for (int l = 1; l <= 1; l++) { for(int i=1;i<=4;i++) { f=172*sqrt(pow((i/large),2)); arrayax1[l]=f; Memo1->Lines->Add(IntToStr(arrayax1[l])); } } for (int l = 1; l <= 1; l++) { for(int i=1;i<=4;i++) { f=172*sqrt(pow((i/width),2)); arrayax2[l]=f; Memo1->Lines->Add(IntToStr(arrayax2[l])); } } for (int l = 1; l <= 1; l++) { for(int i=1;i<=4;i++) { f=172*sqrt(pow((i/height),2)); arrayax3[l]=f; Memo1->Lines->Add(IntToStr(arrayax3[l])); } } int SIZE_1=sizeof(arrayax1)/sizeof(arrayax1[0]); int SIZE_2=sizeof(arrayax2)/sizeof(arrayax2[0]); int SIZE_3=sizeof(arrayax3)/sizeof(arrayax3[0]); // When i want to compare the 3 arrays i use int m=0; for (int i=0; i < SIZE_1; i++) { for (int j = 0; j < SIZE_2; j++) { for (int k = 0; k < SIZE_3; j++) { if (arrayax1==arrayax2 && arrayax1==arrayax3) { data47[m]=arrayax1[i]; Memo2->Lines->Add(StrToInt(data47[m])); m++; } } } } }

Please help i donīt know why this doesn't work