(c program only) 2. Jack `N Poy by CodeChum Admin Jack `N Poy is a very common game since our childhood days. Just thinking about it makes me reminisce how I crushed my cousin in this game until he cried ? I want to feel the glory again of being very good at something. Could you help me recreate the game? It's really simple. In Jack `N Poy, there are two players who both select either one of the following options: Rock Paper Scissors The winner is selected depending on the following rules: Rock beats Scissors Scissors beats Paper Paper beats Rock If both players chose the same option, then it's a tie Instructions: In the code editor, you are provided with an enum called option which contains three possible named values: ROCK - 'r' PAPER - 'p' SCISSORS - 's' Your task is to ask two users for there chosen options. And then based on their options, determine the winner. Input 1. Option selected by Player 1 2. Option selected by Player 2 Output If Player 1 wins, print the message "Player 1 wins!" If Player 2 wins, print the message "Player 2 wins!" If it's a tie, print the message "It's a tie!" Player 1: r Player 2: p Player 2 wins!
(c program only)
2. Jack `N Poy
by CodeChum Admin
Jack `N Poy is a very common game since our childhood days. Just thinking about it makes me reminisce how I crushed my cousin in this game until he cried ?
I want to feel the glory again of being very good at something. Could you help me recreate the game?
It's really simple. In Jack `N Poy, there are two players who both select either one of the following options:
Rock
Paper
Scissors
The winner is selected depending on the following rules:
Rock beats Scissors
Scissors beats Paper
Paper beats Rock
If both players chose the same option, then it's a tie
Instructions:
In the code editor, you are provided with an enum called option which contains three possible named values:
ROCK - 'r'
PAPER - 'p'
SCISSORS - 's'
Your task is to ask two users for there chosen options. And then based on their options, determine the winner.
Input
1. Option selected by Player 1
2. Option selected by Player 2
Output
If Player 1 wins, print the message "Player 1 wins!"
If Player 2 wins, print the message "Player 2 wins!"
If it's a tie, print the message "It's a tie!"
Player 1: r
Player 2: p
Player 2 wins!
Step by step
Solved in 3 steps with 3 images