Coders Packet

Book Cricket game implemented in C++


  • a.exe
  • game.cpp
  • This is a project implementing the Book Cricket game in C++. Book Cricket involves using the random page number of the book to calculate runs scored.

    In this game, Random Numbers are generated between 1 and 100. The 1st digit of the number is considered as the runs and added to the total score of the player.

    If the runs are more than 6, then it is considered as out and the next player comes and bats.

    If the 2nd player scores more than the 1st player, He/She wins, else the 1st player wins. If the scores are equal, then it is considered a tie.

    The rand() function is used to generate the random numbers while srand() makes sure that the numbers generated don't get repetitive.

    The attached file below includes the code and the .exe executable. The code should be run using the g++ compiler.  


    Download Complete Code


    No comments yet