Machine Problem 3
Machine Problem 3
Name: Score:
Section: Date:
OBJECTIVES
● To familiarize the students with the Matlab interface.
MACHINE PROBLEM
Write a program that will simulate the Rock-Paper-Scissors game. Allow two players to input one at a time: (P or p)
for Paper, (R or r) for Rock, (S or s) for scissors. Your program should display who the winner is and the reason for
winning: Paper covers rock, Rock breaks scissors, and Scissors cut paper. Allow users to accept letter inputs
in any case. When you have completed your program and verification, use your program to complete the test data
table below. Provide the following comments: date, author, program description. (Include all possible inputs of
player 1 and player 2)
Sample Output:
Player 1 input:
P
Player 2 Input:
R
Test Data:
Input Output
Player 1 Player 2 Winner Reason