Guest_imported
New member
- Jan 1, 1970
- 0
How would I write a function that searches an array to find an inputed number and returns a one if true and a 0 if false.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
int iFound;
String sLastName = "Jones";
iFound = Array.BinarySearch(MyArray, sLastName);
if (iFound < 0) then
{
// Not found
}
else
{
// iFound contains the index of the found element
}
int CompareTo(
object obj
);