This is a simple implementation of the classic Rock-Paper-Scissors game in C language.
The game allows a player to enter their name, then plays a three-round match of Rock-Paper-Scissors against a computer opponent. At the end of the match, the program displays the results and asks the player if they want to play again.
To play the game, simply run the executable file.
At the start of the game, you will be prompted to enter your name.
Once you enter your name, you will begin a three-round match against the computer. For each round, you will be prompted to choose either rock, paper, or scissors by entering a number 0, 1, or 2, respectively.
After you make your choice, the computer will randomly choose its own option, and the winner of that round will be determined.
At the end of the three rounds, the program will display the final results and ask if you want to play again.
- C compiler (such as GCC or Clang)
- Standard C libraries (
stdio.h
,stdlib.h
,time.h
)
To compile the program, run the following command in your terminal:
gcc -o rock_paper_scissors rock_paper_scissors.c
This will create an executable file called rock_paper_scissors
.
Contributions to the project are welcome! If you find any issues or have suggestions for improvement, please create an issue or submit a pull request.