Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Binary search help

  1. Feb 12, 2009 #1
    I have to write a C++ binary search code where it generates the first 100 odd numbers and the search is used to the find the # 23 any help? im ompletely lost
  2. jcsd
  3. Feb 13, 2009 #2
    If you are completely lost, you are either very modest, didn't go to class, or have no time to do your homework.
    You would do well if you read up some background information and post a tentative solution at the appropriate forum for homework help:

    You could either Google "binary search", or try the following links:

    After that, compile the sample program and do some tests. If you have questions about the algorithms, you can post here. For problems related to coding, you can post at the homework help site.

    Good luck.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook