|
int ax=0,bx=0,a[4],b[4],c=0,fnr=0;
a[0] = StrToInt(Edit1->Text);
a[1] = StrToInt(Edit2->Text);
a[2] = StrToInt(Edit3->Text);
a[3] = StrToInt(Edit4->Text);
b[0] = StrToInt(Edit5->Text);
b[1] = StrToInt(Edit6->Text);
b[2] = StrToInt(Edit7->Text);
b[3] = StrToInt(Edit8->Text);
for(ax=0;ax<4;ax++)
{
for(bx=0;bx<4;bx++)
{
// c=c+1;
if(a[ax]==b[bx])
{
// if(fnr==0)
// {
Label12->Show();
Label13->Show();
Label14->Show();
Label15->Show();
// Label16->Show();
// Label17->Show();
// Label18->Show();
// Label19->Show();
Label20->Show();
Label21->Show();
Label22->Show();
Label23->Show();
Label12->Caption=Edit1->Text;
Label13->Caption=Edit2->Text;
Label14->Caption=Edit3->Text;
Label15->Caption=Edit4->Text;
Label20->Caption=Edit5->Text;
Label21->Caption=Edit6->Text;
Label22->Caption=Edit7->Text;
Label23->Caption=Edit8->Text;
c=c+1;
fnr=1;
// }
if(c==1)
{
Label16->Caption = a[ax];
Label16->Show();
if(Label12->Caption == a[ax])
{
Label12->Hide();
}
if(Label13->Caption == a[ax])
{
Label13->Hide();
}
if(Label14->Caption == a[ax])
{
Label14->Hide();
}
if(Label15->Caption == a[ax])
{
Label15->Hide();
}
if(Label20->Caption == a[ax])
{
Label20->Hide();
}
if(Label21->Caption == a[ax])
{
Label21->Hide();
}
if(Label22->Caption == a[ax])
{
Label22->Hide();
}
if(Label23->Caption == a[ax])
{
Label23->Hide();
}
}
if(c==2)
{
Label17->Caption = a[ax];
Label17->Show();
if(Label12->Caption == a[ax])
{
Label12->Hide();
}
if(Label13->Caption == a[ax])
{
Label13->Hide();
}
if(Label14->Caption == a[ax])
{
Label14->Hide();
}
if(Label15->Caption == a[ax])
{
Label15->Hide();
}
if(Label20->Caption == a[ax])
{
Label20->Hide();
}
if(Label21->Caption == a[ax])
{
Label21->Hide();
}
if(Label22->Caption == a[ax])
{
Label22->Hide();
}
if(Label23->Caption == a[ax])
{
Label23->Hide();
}
}
if(c==3)
{
Label18->Caption = a[ax];
Label18->Show();
if(Label12->Caption == a[ax])
{
Label12->Hide();
}
if(Label13->Caption == a[ax])
{
Label13->Hide();
}
if(Label14->Caption == a[ax])
{
Label14->Hide();
}
if(Label15->Caption == a[ax])
{
Label15->Hide();
}
if(Label20->Caption == b[bx])
{
Label20->Hide();
}
if(Label21->Caption == b[bx])
{
Label21->Hide();
}
if(Label22->Caption == b[bx])
{
Label22->Hide();
}
if(Label23->Caption == b[bx])
{
Label23->Hide();
}
}
if(c==4)
{
Label19->Caption = a[ax];
Label19->Show();
if(Label12->Caption == a[ax])
{
Label12->Hide();
}
if(Label13->Caption == a[ax])
{
Label13->Hide();
}
if(Label14->Caption == a[ax])
{
Label14->Hide();
}
if(Label15->Caption == a[ax])
{
Label15->Hide();
}
if(Label20->Caption == b[bx])
{
Label20->Hide();
}
if(Label21->Caption == b[bx])
{
Label21->Hide();
}
if(Label22->Caption == b[bx])
{
Label22->Hide();
}
if(Label23->Caption == b[bx])
{
Label23->Hide();
}
}
}
else
{
}
}
}
a[ax]=a[ax]-a[ax];
b[bx]=b[bx]-b[bx];
c=c-c;
첫번째껀 괜찮은데 두번째부터 숫자가 엉키기 시작하네요...
해결방법점,,
|