You need to prepare a binary to decimal memory game.
Question: How to use C++ to create a binary-to-decimal memory game
The computer generates a random sequence of 0s and 1s creating a binary number.
In each round, the computer adds one more bit to the previous sequence, only displaying the added bit.
The user then needs to enter the decimal value of the binary number represented by the sequence of 0s and 1s displayed so far.
At the starting of the game, the computer asks the user to provide a number between 0 and 5 to be used as the number of mistakes allowed per game.
A mistake happens every time the user enters a wrong decimal number.
When the user exhausts the number of allowed mistakes, the game terminates and the user loses.
Be sure to include comments. The comment should describe the purpose of the program and the data to be entered.