Just basic glazing over the code, quick question, is the data being read in sorted?
The issue is that you do a binary search to see if the record is in the array, then if it is, you dutifully search through each record again using a sequential search. Have the binary search tell you the index of the found record. Also, look at the for block starting on line 50:
1 2 3
|
for(...)
if (found && ...)
{...}else{cout<<"Number not found"; ...;}
|
You never change found from within the loop, if it is false, you are going to spit out the else block 15 times in a row, no matter what else. Make found a condition of entering the loop, because if you know the number isn't there, you know you can skip the entire loop, because you will never find the number that isn't there. But more importantly, you should have the binary search tell you the index. I'm almost positive you would get marked down for using a linear search again later for completely missing the point of the exercise.
The assignment on line 98 is completely useless as well, it will always be assigning the integer it currently has to itself again, by definition.