Sunday, November 7, 2010

Binary search

Expand Post »this is a code for the binary search program in c language.now the program is not showing any error but when i run this program then the output is like:
enter the total numbers:6
enter the array elements: 5 4 7 1 3 2
the sorted numbers are:1 2 3 4 5 7
enter the number to be searched:5
then it prints::::the number is not found
now why does it always print the number is not found no matter what number i enter.it always show "the number is not found"????why?????it is printing the sorted list alright.so why not the number then?plz help me out!!!!!!!!

No comments:

Post a Comment

Total Pageviews