1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
private: System::Void btnSearch_Click(System::Object^ sender, System::EventArgs^ e) {
double found;
int mid;
int target;
int n = 8;
int num;
double uniform[] = {3, 4, 6, 8, 9, 10, 13, 15};
double assists[] = {12.3, 14.6, 2.6, 8.6, 4.7, 6.9, 10.1, 5.5};
Int32::TryParse(txtUniform->Text, target);
//for seq. search
for (int i = 0; i < 8; i++)
{
if (target == uniform[i])
txtAssists->Text = assists[i].ToString();
}
}
|