What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Cows and bulls programme

Cows and bulls programme
Author: Message:
Rubber Stamp
Senior Member
****

Avatar
It Was Never Random

Posts: 587
Reputation: 14
34 / Male / –
Joined: May 2004
O.P. Cows and bulls programme
can someone please help write a c++ programe for a cows and bulls game??
the game is something like this:


***A bull is a symbol in the guess that matches a symbol of the code both by position and value.
A cow is a symbol in the guess that matches one of the code by value, but not by a position.
example:
the code is : ROYY
yhe guess is: RYBR
then the score would be one bull ( R ) and one cow( Y ).

the program must read some guesses and thier scores.
and output all the codes consistent with the sequence of guesses and responses:
if we enter:
RRRR 2 0
RRBB 2 2

the program must output:
RBRB
RBBR
BRRB
BRBR****

i got the above rules frm some other side. but i dont want the game to be run with letters but numbers, using simple loops and the randomize function.

Thanx.

This post was edited on 01-29-2006 at 01:28 PM by Rubber Stamp.
01-29-2006 01:28 PM
Profile E-Mail PM Find Quote Report
saralk
Veteran Member
*****

Avatar

Posts: 2598
Reputation: 38
35 / Male / Flag
Joined: Feb 2003
RE: Cows and bulls programme
I don't understand the second bit, can you explain that again?
The Artist Formerly Known As saralk
London · New York · Paris
Est. 1989
01-29-2006 05:18 PM
Profile PM Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: Cows and bulls programme
So a bastardized version of mastermind then?
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
01-29-2006 06:13 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On