In this we gonna learn how the guessing number works with the medium of c++. It is a simple algorithm where we differentiate the numbers into two groups in which a group of numbers are smaller than result value and other group is greater than result value.
The result is the generated value by system, which we gonna find.
In this program the machine will generate a value between 0 to 100, and we have to find it .It has no time limit and unlimited guess chances. the system will show a hint when you entered nearest number of result, it works simply by dividing the your number and system number by 10, for eg: if you entered 88 and machine generated 81 now the numbers are divided by 10, then the value will be same as 8 now the system compares them and show a hint if they are equal.
If you want to close or exit program you have enter 0(zero) in input line.
To download the source code, click on below button