CJCoding With Joseph

Rock Paper Scissors Winner

Read two characters with scanf(" %c %c", ...) for player 1 and player 2. Each is R (rock), P (paper), or S (scissors). Rock beats scissors, scissors beats paper, and paper beats rock. Print the result with no trailing newline:

print Player 1 if player 1 wins, Player 2 if player 2 wins, or Tie if they match.

For input R S the output is Player 1; for R P it is Player 2; for R R it is Tie.

Expected Output:

Player 1
Topics:
If Statements
๐Ÿ“ฅ Auto-Input:
R S\n
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (p, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.