Question: Name this program one.c - This program plays the classic childhood game of rock-paper-scissors. Your program reads two moves and then prints the winner. You

 Name this program one.c - This program plays the classic childhood

Name this program one.c - This program plays the classic childhood game 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 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 Scissors same string. The rules of the game are shown at the right. 1. Player 1 Player 2 Winner rock paper P2 rock scissors P1 P1 paper scissors P2 P2 scissors paper P1 rock rock rocke orushes scissors, paper covers rock, scissors eut 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!