Start New Discussion within our Software Development Community

Hiii,, i'm really confused in here,, can someone plzz answer this question:
Write a program that plays the famous Rock/Paper/Scissors game against a user. In this game the user will enter his choice and the computer randomly selects a choice. The winner of the game is determined as follows. If both choices select the same type, it is a tie. Otherwise, Rock beats Scissors, Paper beats Rock, and Scissors beats Paper.
Write a program that ask the user to enter his choice then randomly selects a choice for the computer then call function WhoWins to determine and return the winner. Function WhoWins returns 0 if the game is a tie, -1 if x beats y and +1 if y beats x
int WhoWins (int x, int y);

Bellow are samples of the output:
Please enter your choice (1 for Scissors, 2 for Paper, and 3 for rocket): 3
The computer randomly selects 2
You win. Good Job
Please enter your choice (1 for Scissors, 2 for Paper, and 3 for rocket): 1
The computer randomly selects 1
It is a Tie
Please enter your choice (1 for Scissors, 2 for Paper, and 3 for rocket): 2
The computer randomly selects 1
Computer Wins, Hard Luck
Thanks,,

Yes, most of us can answer the question -- if there was one. There was not one :icon_question: in the entire post, so no question was asked.

On the other hand, if the question was actually implied and was "can someone write code from this problem description" the answer is again, yes.

On the off chance the real question was "can someone write code from this problem description for me" the answer this time is no. We are not a homework service.

My question to you, nbs_87, is why are you hijacking a tutorial thread and not posting in your own thread as the Rules and the post Read Me: Read This Before Posting suggest?

This article has been dead for over six months. Start a new discussion instead.