scanf is not not working. may be header prob..is there a better way to code this...need to find min no of guess required to determine a no. between 1 and 1000 by only usin divide
What makes you think that scanf is not working? Add a printf() right after the scanf statements to print the value scanned. You may find that scanf is working fine. In that case, maybe the rest of your algorithm is broken.
Learn how to use the debugger. It can be really valuable to find bugs.
I did use debugger and code is just working fine ...i replaced scanf and put m=6 ...it gives 4....but not taking input from user....i used codeblocks at first...then online debugger dbgr.cc...any help would be appreciated
What is the program supposed to do? In addition to moving hte return, I suspect that you need move the definitions of c and x inside the do/while loop so they get initialized each time through the loop.