# Your friend choses an integer between 0to100 you have to find out the number by asking question but your friend can say yes or no what strategy u use

2
by kvarundeep994

2015-07-19T18:03:41+05:30
You may ask questions asking if the number is divisible by common prime numbers
2015-07-19T19:11:20+05:30
Ask as greater than or less than and go on dividing by 2..
Example: let the number you thought is 57 and i am asking you question.

First i divide 100 by 2. I get 50.
Q - is it less than 50? A - no

So it is either 50 or greater.
I divide 50 by 2. I get 25. And add it(since the number is greater) to previous number i had got (that is 50). So i get 75.
Q - Is it less than 75? A - yes.

Next i divide 25 by 2. I get 12.5. So i take 12. And subtract it(since the number is less) to previous number i had got (that is 75). So i get 75-12 = 62.
Q - is it less than 62? A - yes

Next I divide 12 by 2. I get 6. And subtract it(since the number is less) from previous number i had got (that is 62). So i get 62-6 = 56.
Q - Is it less than 56? A - no.

So it is either 56 or greater.
I divide   6 by 2. I get 3. And add it(since the number is greater) to previous number i had got (that is 56). So i get 59.
Q - Is it less than 59? A - yes.

Next I divide 3 by 2. I get 1.5. So i take 1. And subtract it(since the number is less) from previous number i had got (that is 59). So i get 59-1 = 58.
Q - Is it less than 58? A - yes.

So number is less than 58 and greater than 56.
It is 57 only. I will tell you that number is 57.

Next we can play it once if you want. Comment below.