The program starts by including the necessary header files (stdio.h, stdlib.h, and time.h).
The constants SNAKE, WATER, and GUN are defined.
Step 2: Seed the Random Number Generator
The srand function is called with the current time as an argument to seed the random number generator.
Step 3: Generate Computer's Choice
The rand() function is called to generate a random number between 0 and 2, which is assigned to the computer variable.
Step 4: Get User's Choice
The program prompts the user to choose 0 for Snake, 1 for Water, or 2 for Gun.
The user's input is stored in the player variable using scanf.
Step 5: Print Choices
The print_choice function is called to print the user's choice and the computer's choice in a human-readable format.
Step 6: Determine the Outcome
The program checks if the user's choice is the same as the computer's choice. If so, it's a draw.
If not, the program checks if the user's choice beats the computer's choice according to the game's rules (Snake beats Water, Water beats Gun, Gun beats Snake). If so, the user wins.
If none of the above conditions are true, the user loses.
Step 7: Print the Outcome
The program prints the outcome of the game (Draw, Win, or Lose).
Step 8: Exit
The program returns 0 to indicate successful execution.
Step 1: Initialization
Step 2: Seed the Random Number Generator
Step 3: Generate Computer's Choice
Step 4: Get User's Choice
Step 5: Print Choices
Step 6: Determine the Outcome
Step 7: Print the Outcome
Step 8: Exit
OutPut