This algorithm guess the number which you keep in your mind if you answer some of its questions, which is implemented in C programming. This is the algorithm which follows math trick, I saw this in some of the math trick book and implemented as number guesser in C.