Question: c lang Player 1 | Player 2Winner paper Name this program one.c - Thi of rock-paper-scissors. Your program reads two moves and then prints the
c lang
Player 1 | Player 2Winner paper Name this program one.c - Thi of rock-paper-scissors." Your program reads two moves and then prints the winner. You store each move in a string of length ten (all input is lower-case and the user will never enter invalid input). Read the two moves Paper and print the winner of the game. Each time you run the program, it plays the game once. You should print "Tie" (no winner) if both users enter the same string. The rules of the game are shown at the right. s program plays the classic childhood game rock rock scis P2 P1 P1 P2 P2 P1 rock paper scissors scissorsrock scissors paper rock crushes scissors, paper covers rock, scissors cut paper A few sample executions are shown below: /a.out Player 1 move: rock Player 2 move: paper Winner is Player 2 /a.out Player 1 move: scissors Player 2 move: paper Winner is Player 1 /a.out Player 1 move: scissors Player 2 move: scissors Game is a tie
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
