Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 tieStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started