Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,398 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,116 people online right now. Registration is fast and FREE... Join Now!




Rock Paper Scissors Implementation - Homework

 
Reply to this topicStart new topic

Rock Paper Scissors Implementation - Homework

phuker420
23 Oct, 2006 - 05:01 PM
Post #1

New D.I.C Head
*

Joined: 23 Oct, 2006
Posts: 2


My Contributions
don't know how to get started please help with this program.

rock,paper,scissors

We will write a program that multiple games of rock, paper, scissors: keeps a cumulitive score, quits when either player enters a 'Q' and declares an overall winner.

Input: Two players enter their respective plays at the prompts. Valid input is 'R', 'P', or 'S'. The program should accept bad input with an error message.'R' beats 'S'; 'S' beats 'P', and 'P' beats 'R'. The program should record each players total number of ins as well as the number of ties. Invalid plays are not counted unless you choose to do so.

The program should echo print the output and state the winner of each round. At the end, the scores are printed and a winner is declared.

The purpose of this program is to demonstrate subroutines (functions) and parameter passing using both pass by value (passing a copy) and pass by reference (passing such that the parameter may be changed).
User is offlineProfile CardPM
+Quote Post

William_Wilson
RE: Rock Paper Scissors Implementation - Homework
23 Oct, 2006 - 05:23 PM
Post #2

lost in compilation
Group Icon

Joined: 23 Dec, 2005
Posts: 4,013



Thanked: 18 times
Dream Kudos: 3275
Expert In: Java, C, Javascript

My Contributions
zero effort shown, gets you zero help. There is a manditory good faith code required for help.
User is offlineProfile CardPM
+Quote Post

phuker420
RE: Rock Paper Scissors Implementation - Homework
23 Oct, 2006 - 05:29 PM
Post #3

New D.I.C Head
*

Joined: 23 Oct, 2006
Posts: 2


My Contributions
QUOTE(William_Wilson @ 23 Oct, 2006 - 06:23 PM) *

zero effort shown, gets you zero help. There is a manditory good faith code required for help.



i don't need the program done for me i just need an idea on how to get started.but it's ok if u don't want to help thank u for nothing
User is offlineProfile CardPM
+Quote Post

Amadeus
RE: Rock Paper Scissors Implementation - Homework
23 Oct, 2006 - 05:29 PM
Post #4

g++ -o drink whiskey.cpp
Group Icon

Joined: 12 Jul, 2002
Posts: 12,230



Thanked: 40 times
Dream Kudos: 25
My Contributions
WW is correct...it would be better if you gave it a shot.

To get started, write a small routine that accepts user input, and then checks to see if that input is one of the valid characters.
User is offlineProfile CardPM
+Quote Post

gregoryH
RE: Rock Paper Scissors Implementation - Homework
24 Oct, 2006 - 03:00 AM
Post #5

D.I.C Regular
Group Icon

Joined: 4 Oct, 2006
Posts: 417


Dream Kudos: 50
My Contributions
QUOTE(phuker420 @ 23 Oct, 2006 - 06:01 PM) *

don't know how to get started please help with this program.

The purpose of this program is to demonstrate subroutines (functions) and parameter passing using both pass by value (passing a copy) and pass by reference (passing such that the parameter may be changed).

Perhaps you need to look here for some ideas...
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/5/08 03:00AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month